summaryrefslogtreecommitdiffstats
path: root/Lib/xmlrpc
diff options
context:
space:
mode:
authorGeorg Brandl <georg@python.org>2009-06-04 09:11:51 (GMT)
committerGeorg Brandl <georg@python.org>2009-06-04 09:11:51 (GMT)
commitb54d801280e3f510782e2855504710947d10f053 (patch)
tree457166089bbc17f190eb7140755c7948e2918829 /Lib/xmlrpc
parentcef803f82c82017b734dd4264478ae6f02ce21f5 (diff)
downloadcpython-b54d801280e3f510782e2855504710947d10f053.zip
cpython-b54d801280e3f510782e2855504710947d10f053.tar.gz
cpython-b54d801280e3f510782e2855504710947d10f053.tar.bz2
#3613: add base64.encodebytes and decodebytes as the new spelling of encodestring and decodestring; deprecate the latter.
Diffstat (limited to 'Lib/xmlrpc')
-rw-r--r--Lib/xmlrpc/client.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/Lib/xmlrpc/client.py b/Lib/xmlrpc/client.py
index 05a1c8a..c62dbc4 100644
--- a/Lib/xmlrpc/client.py
+++ b/Lib/xmlrpc/client.py
@@ -419,11 +419,11 @@ class Binary:
return self.data != other
def decode(self, data):
- self.data = base64.decodestring(data)
+ self.data = base64.decodebytes(data)
def encode(self, out):
out.write("<value><base64>\n")
- encoded = base64.encodestring(self.data)
+ encoded = base64.encodebytes(self.data)
out.write(encoded.decode('ascii'))
out.write('\n')
out.write("</base64></value>\n")
@@ -1100,7 +1100,7 @@ class Transport:
if auth:
import base64
auth = urllib.parse.unquote_to_bytes(auth)
- auth = base64.encodestring(auth).decode("utf-8")
+ auth = base64.encodebytes(auth).decode("utf-8")
auth = "".join(auth.split()) # get rid of whitespace
extra_headers = [
("Authorization", "Basic " + auth)