[Python-checkins] r87102 - python/branches/py3k/Lib/encodings/base64_codec.py
georg.brandl
python-checkins at python.org
Mon Dec 6 23:25:26 CET 2010
Author: georg.brandl
Date: Mon Dec 6 23:25:25 2010
New Revision: 87102
Log:
Don't use deprecated aliases.
Modified:
python/branches/py3k/Lib/encodings/base64_codec.py
Modified: python/branches/py3k/Lib/encodings/base64_codec.py
==============================================================================
--- python/branches/py3k/Lib/encodings/base64_codec.py (original)
+++ python/branches/py3k/Lib/encodings/base64_codec.py Mon Dec 6 23:25:25 2010
@@ -13,11 +13,11 @@
def base64_encode(input, errors='strict'):
assert errors == 'strict'
- return (base64.encodestring(input), len(input))
+ return (base64.encodebytes(input), len(input))
def base64_decode(input, errors='strict'):
assert errors == 'strict'
- return (base64.decodestring(input), len(input))
+ return (base64.decodebytes(input), len(input))
class Codec(codecs.Codec):
def encode(self, input, errors='strict'):
@@ -28,12 +28,12 @@
class IncrementalEncoder(codecs.IncrementalEncoder):
def encode(self, input, final=False):
assert self.errors == 'strict'
- return base64.encodestring(input)
+ return base64.encodebytes(input)
class IncrementalDecoder(codecs.IncrementalDecoder):
def decode(self, input, final=False):
assert self.errors == 'strict'
- return base64.decodestring(input)
+ return base64.decodebytes(input)
class StreamWriter(Codec, codecs.StreamWriter):
charbuffertype = bytes
More information about the Python-checkins
mailing list