]> granicus.if.org Git - python/commitdiff
Don't use deprecated aliases.
authorGeorg Brandl <georg@python.org>
Mon, 6 Dec 2010 22:25:25 +0000 (22:25 +0000)
committerGeorg Brandl <georg@python.org>
Mon, 6 Dec 2010 22:25:25 +0000 (22:25 +0000)
Lib/encodings/base64_codec.py

index e8b19ee237d83f194ef98010dc22ba25c73bbb6e..321a961782a596678755ed3bf2607bafa67b597e 100644 (file)
@@ -13,11 +13,11 @@ import base64
 
 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 Codec(codecs.Codec):
 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