summaryrefslogtreecommitdiffstats
path: root/Lib/base64.py
diff options
context:
space:
mode:
authorBerker Peksag <berker.peksag@gmail.com>2017-03-03 15:07:18 (GMT)
committerGitHub <noreply@github.com>2017-03-03 15:07:18 (GMT)
commitc7ff163abf428d73d4054754db3c99d06487e3ad (patch)
treea150495fe14a9a46db21bcf95d1988eae547d5d3 /Lib/base64.py
parent2adc66848135be8e86ba08690a858737a65ae40d (diff)
downloadcpython-c7ff163abf428d73d4054754db3c99d06487e3ad.zip
cpython-c7ff163abf428d73d4054754db3c99d06487e3ad.tar.gz
cpython-c7ff163abf428d73d4054754db3c99d06487e3ad.tar.bz2
Add Python version since deprecation in base64 methods. (#33) (#429)
Allow developers to not have to either test on N Python versions or looked through multiple versions of the docs to know whether they can easily update. (cherry picked from commit c643a967dd7d33ccefa5b61b38caf40b448057ce)
Diffstat (limited to 'Lib/base64.py')
-rwxr-xr-xLib/base64.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/Lib/base64.py b/Lib/base64.py
index 58f6ad6..eb8f258 100755
--- a/Lib/base64.py
+++ b/Lib/base64.py
@@ -541,7 +541,8 @@ def encodebytes(s):
def encodestring(s):
"""Legacy alias of encodebytes()."""
import warnings
- warnings.warn("encodestring() is a deprecated alias, use encodebytes()",
+ warnings.warn("encodestring() is a deprecated alias since 3.1, "
+ "use encodebytes()",
DeprecationWarning, 2)
return encodebytes(s)
@@ -554,7 +555,8 @@ def decodebytes(s):
def decodestring(s):
"""Legacy alias of decodebytes()."""
import warnings
- warnings.warn("decodestring() is a deprecated alias, use decodebytes()",
+ warnings.warn("decodestring() is a deprecated alias since Python 3.1, "
+ "use decodebytes()",
DeprecationWarning, 2)
return decodebytes(s)