[pypy-svn] r14069 - pypy/branch/dist-2.4.1/lib-python/modified-2.4.1/encodings

gintas at codespeak.net gintas at codespeak.net
Fri Jul 1 21:13:48 CEST 2005


Author: gintas
Date: Fri Jul  1 21:13:47 2005
New Revision: 14069

Added:
   pypy/branch/dist-2.4.1/lib-python/modified-2.4.1/encodings/
      - copied from r14063, pypy/branch/dist-2.4.1/lib-python/2.4.1/encodings/
Modified:
   pypy/branch/dist-2.4.1/lib-python/modified-2.4.1/encodings/ascii.py
   pypy/branch/dist-2.4.1/lib-python/modified-2.4.1/encodings/charmap.py
   pypy/branch/dist-2.4.1/lib-python/modified-2.4.1/encodings/latin_1.py
   pypy/branch/dist-2.4.1/lib-python/modified-2.4.1/encodings/mbcs.py
   pypy/branch/dist-2.4.1/lib-python/modified-2.4.1/encodings/raw_unicode_escape.py
   pypy/branch/dist-2.4.1/lib-python/modified-2.4.1/encodings/string_escape.py
   pypy/branch/dist-2.4.1/lib-python/modified-2.4.1/encodings/unicode_escape.py
   pypy/branch/dist-2.4.1/lib-python/modified-2.4.1/encodings/unicode_internal.py
   pypy/branch/dist-2.4.1/lib-python/modified-2.4.1/encodings/utf_7.py
Log:
Added staticmethod to encode/decode method assignments in the encodings
package.  The tests seem to fail for other reasons, so I'm not sure if
these changes are complete or even correct.


Modified: pypy/branch/dist-2.4.1/lib-python/modified-2.4.1/encodings/ascii.py
==============================================================================
--- pypy/branch/dist-2.4.1/lib-python/2.4.1/encodings/ascii.py	(original)
+++ pypy/branch/dist-2.4.1/lib-python/modified-2.4.1/encodings/ascii.py	Fri Jul  1 21:13:47 2005
@@ -14,8 +14,8 @@
 
     # Note: Binding these as C functions will result in the class not
     # converting them to methods. This is intended.
-    encode = codecs.ascii_encode
-    decode = codecs.ascii_decode
+    encode = staticmethod(codecs.ascii_encode)
+    decode = staticmethod(codecs.ascii_decode)
 
 class StreamWriter(Codec,codecs.StreamWriter):
     pass

Modified: pypy/branch/dist-2.4.1/lib-python/modified-2.4.1/encodings/charmap.py
==============================================================================
--- pypy/branch/dist-2.4.1/lib-python/2.4.1/encodings/charmap.py	(original)
+++ pypy/branch/dist-2.4.1/lib-python/modified-2.4.1/encodings/charmap.py	Fri Jul  1 21:13:47 2005
@@ -18,8 +18,8 @@
 
     # Note: Binding these as C functions will result in the class not
     # converting them to methods. This is intended.
-    encode = codecs.charmap_encode
-    decode = codecs.charmap_decode
+    encode = staticmethod(codecs.charmap_encode)
+    decode = staticmethod(codecs.charmap_decode)
 
 class StreamWriter(Codec,codecs.StreamWriter):
 

Modified: pypy/branch/dist-2.4.1/lib-python/modified-2.4.1/encodings/latin_1.py
==============================================================================
--- pypy/branch/dist-2.4.1/lib-python/2.4.1/encodings/latin_1.py	(original)
+++ pypy/branch/dist-2.4.1/lib-python/modified-2.4.1/encodings/latin_1.py	Fri Jul  1 21:13:47 2005
@@ -14,8 +14,8 @@
 
     # Note: Binding these as C functions will result in the class not
     # converting them to methods. This is intended.
-    encode = codecs.latin_1_encode
-    decode = codecs.latin_1_decode
+    encode = staticmethod(codecs.latin_1_encode)
+    decode = staticmethod(codecs.latin_1_decode)
 
 class StreamWriter(Codec,codecs.StreamWriter):
     pass

Modified: pypy/branch/dist-2.4.1/lib-python/modified-2.4.1/encodings/mbcs.py
==============================================================================
--- pypy/branch/dist-2.4.1/lib-python/2.4.1/encodings/mbcs.py	(original)
+++ pypy/branch/dist-2.4.1/lib-python/modified-2.4.1/encodings/mbcs.py	Fri Jul  1 21:13:47 2005
@@ -15,8 +15,8 @@
 
     # Note: Binding these as C functions will result in the class not
     # converting them to methods. This is intended.
-    encode = codecs.mbcs_encode
-    decode = codecs.mbcs_decode
+    encode = staticmethod(codecs.mbcs_encode)
+    decode = staticmethod(codecs.mbcs_decode)
 
 class StreamWriter(Codec,codecs.StreamWriter):
     pass

Modified: pypy/branch/dist-2.4.1/lib-python/modified-2.4.1/encodings/raw_unicode_escape.py
==============================================================================
--- pypy/branch/dist-2.4.1/lib-python/2.4.1/encodings/raw_unicode_escape.py	(original)
+++ pypy/branch/dist-2.4.1/lib-python/modified-2.4.1/encodings/raw_unicode_escape.py	Fri Jul  1 21:13:47 2005
@@ -14,8 +14,8 @@
 
     # Note: Binding these as C functions will result in the class not
     # converting them to methods. This is intended.
-    encode = codecs.raw_unicode_escape_encode
-    decode = codecs.raw_unicode_escape_decode
+    encode = staticmethod(codecs.raw_unicode_escape_encode)
+    decode = staticmethod(codecs.raw_unicode_escape_decode)
 
 class StreamWriter(Codec,codecs.StreamWriter):
     pass

Modified: pypy/branch/dist-2.4.1/lib-python/modified-2.4.1/encodings/string_escape.py
==============================================================================
--- pypy/branch/dist-2.4.1/lib-python/2.4.1/encodings/string_escape.py	(original)
+++ pypy/branch/dist-2.4.1/lib-python/modified-2.4.1/encodings/string_escape.py	Fri Jul  1 21:13:47 2005
@@ -9,8 +9,8 @@
 
 class Codec(codecs.Codec):
 
-    encode = codecs.escape_encode
-    decode = codecs.escape_decode
+    encode = staticmethod(codecs.escape_encode)
+    decode = staticmethod(codecs.escape_decode)
 
 class StreamWriter(Codec,codecs.StreamWriter):
     pass

Modified: pypy/branch/dist-2.4.1/lib-python/modified-2.4.1/encodings/unicode_escape.py
==============================================================================
--- pypy/branch/dist-2.4.1/lib-python/2.4.1/encodings/unicode_escape.py	(original)
+++ pypy/branch/dist-2.4.1/lib-python/modified-2.4.1/encodings/unicode_escape.py	Fri Jul  1 21:13:47 2005
@@ -14,8 +14,8 @@
 
     # Note: Binding these as C functions will result in the class not
     # converting them to methods. This is intended.
-    encode = codecs.unicode_escape_encode
-    decode = codecs.unicode_escape_decode
+    encode = staticmethod(codecs.unicode_escape_encode)
+    decode = staticmethod(codecs.unicode_escape_decode)
 
 class StreamWriter(Codec,codecs.StreamWriter):
     pass

Modified: pypy/branch/dist-2.4.1/lib-python/modified-2.4.1/encodings/unicode_internal.py
==============================================================================
--- pypy/branch/dist-2.4.1/lib-python/2.4.1/encodings/unicode_internal.py	(original)
+++ pypy/branch/dist-2.4.1/lib-python/modified-2.4.1/encodings/unicode_internal.py	Fri Jul  1 21:13:47 2005
@@ -14,8 +14,8 @@
 
     # Note: Binding these as C functions will result in the class not
     # converting them to methods. This is intended.
-    encode = codecs.unicode_internal_encode
-    decode = codecs.unicode_internal_decode
+    encode = staticmethod(codecs.unicode_internal_encode)
+    decode = staticmethod(codecs.unicode_internal_decode)
 
 class StreamWriter(Codec,codecs.StreamWriter):
     pass

Modified: pypy/branch/dist-2.4.1/lib-python/modified-2.4.1/encodings/utf_7.py
==============================================================================
--- pypy/branch/dist-2.4.1/lib-python/2.4.1/encodings/utf_7.py	(original)
+++ pypy/branch/dist-2.4.1/lib-python/modified-2.4.1/encodings/utf_7.py	Fri Jul  1 21:13:47 2005
@@ -10,8 +10,8 @@
 
     # Note: Binding these as C functions will result in the class not
     # converting them to methods. This is intended.
-    encode = codecs.utf_7_encode
-    decode = codecs.utf_7_decode
+    encode = staticmethod(codecs.utf_7_encode)
+    decode = staticmethod(codecs.utf_7_decode)
 
 class StreamWriter(Codec,codecs.StreamWriter):
     pass



More information about the Pypy-commit mailing list