mirror of
				https://github.com/python/cpython.git
				synced 2025-11-04 07:31:38 +00:00 
			
		
		
		
	Don't use deprecated aliases.
This commit is contained in:
		
							parent
							
								
									fbb56ed8fb
								
							
						
					
					
						commit
						7c23ea2e88
					
				
					 1 changed files with 4 additions and 4 deletions
				
			
		| 
						 | 
				
			
			@ -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 @@ def decode(self, input, errors='strict'):
 | 
			
		|||
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
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue