[Python-checkins] CVS: python/dist/src/Lib/encodings base64_codec.py,1.1,1.2 hex_codec.py,1.1,1.2 quopri_codec.py,1.1,1.2 uu_codec.py,1.1,1.2 zlib_codec.py,1.1,1.2

M.-A. Lemburg lemburg@users.sourceforge.net
Thu, 20 Sep 2001 03:33:40 -0700


Update of /cvsroot/python/python/dist/src/Lib/encodings
In directory usw-pr-cvs1:/tmp/cvs-serv16662/Lib/encodings

Modified Files:
	base64_codec.py hex_codec.py quopri_codec.py uu_codec.py 
	zlib_codec.py 
Log Message:
Patch #462635 by Andrew Kuchling correcting bugs in the new
codecs -- the self argument does matter for Python functions (it
does not for C functions which most other codecs use).



Index: base64_codec.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/encodings/base64_codec.py,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** base64_codec.py	2001/05/15 12:00:02	1.1
--- base64_codec.py	2001/09/20 10:33:38	1.2
***************
*** 45,50 ****
  class Codec(codecs.Codec):
  
!     encode = base64_encode
!     decode = base64_decode
  
  class StreamWriter(Codec,codecs.StreamWriter):
--- 45,52 ----
  class Codec(codecs.Codec):
  
!     def encode(self, input,errors='strict'):
!         return base64_encode(input,errors)
!     def decode(self, input,errors='strict'):
!         return base64_decode(input,errors)
  
  class StreamWriter(Codec,codecs.StreamWriter):

Index: hex_codec.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/encodings/hex_codec.py,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** hex_codec.py	2001/05/15 12:00:02	1.1
--- hex_codec.py	2001/09/20 10:33:38	1.2
***************
*** 45,50 ****
  class Codec(codecs.Codec):
  
!     encode = hex_encode
!     decode = hex_decode
  
  class StreamWriter(Codec,codecs.StreamWriter):
--- 45,52 ----
  class Codec(codecs.Codec):
  
!     def encode(self, input,errors='strict'):
!         return hex_encode(input,errors)
!     def decode(self, input,errors='strict'):
!         return hex_decode(input,errors)
  
  class StreamWriter(Codec,codecs.StreamWriter):

Index: quopri_codec.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/encodings/quopri_codec.py,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** quopri_codec.py	2001/05/15 15:34:07	1.1
--- quopri_codec.py	2001/09/20 10:33:38	1.2
***************
*** 42,47 ****
  class Codec(codecs.Codec):
  
!     encode = quopri_encode
!     decode = quopri_decode
  
  class StreamWriter(Codec, codecs.StreamWriter):
--- 42,49 ----
  class Codec(codecs.Codec):
  
!     def encode(self, input,errors='strict'):
!         return quopri_encode(input,errors)
!     def decode(self, input,errors='strict'):
!         return quopri_decode(input,errors)
  
  class StreamWriter(Codec, codecs.StreamWriter):

Index: uu_codec.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/encodings/uu_codec.py,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** uu_codec.py	2001/05/15 12:00:02	1.1
--- uu_codec.py	2001/09/20 10:33:38	1.2
***************
*** 95,101 ****
  class Codec(codecs.Codec):
  
!     encode = uu_encode
!     decode = uu_decode
! 
  class StreamWriter(Codec,codecs.StreamWriter):
      pass
--- 95,103 ----
  class Codec(codecs.Codec):
  
!     def encode(self,input,errors='strict'):
!         return uu_encode(input,errors)
!     def decode(self,input,errors='strict'):
!         return uu_decode(input,errors)
!     
  class StreamWriter(Codec,codecs.StreamWriter):
      pass

Index: zlib_codec.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/encodings/zlib_codec.py,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** zlib_codec.py	2001/05/15 12:00:02	1.1
--- zlib_codec.py	2001/09/20 10:33:38	1.2
***************
*** 46,51 ****
  class Codec(codecs.Codec):
  
!     encode = zlib_encode
!     decode = zlib_decode
  
  class StreamWriter(Codec,codecs.StreamWriter):
--- 46,53 ----
  class Codec(codecs.Codec):
  
!     def encode(self, input, errors='strict'):
!         return zlib_encode(input, errors)
!     def decode(self, input, errors='strict'):
!         return zlib_decode(input, errors)
  
  class StreamWriter(Codec,codecs.StreamWriter):