[Python-3000-checkins] r57145 - in python/branches/py3k: Doc/c-api/concrete.rst Lib/encodings/utf_32.py

walter.doerwald python-3000-checkins at python.org
Fri Aug 17 18:24:02 CEST 2007


Author: walter.doerwald
Date: Fri Aug 17 18:23:21 2007
New Revision: 57145

Modified:
   python/branches/py3k/Doc/c-api/concrete.rst
   python/branches/py3k/Lib/encodings/utf_32.py
Log:
Fix stupid typo in Lib/encodings/utf_32.py which led to failing tests
on big endian machines.

Update documentation: UTF-32 codecs will be in 2.6.


Modified: python/branches/py3k/Doc/c-api/concrete.rst
==============================================================================
--- python/branches/py3k/Doc/c-api/concrete.rst	(original)
+++ python/branches/py3k/Doc/c-api/concrete.rst	Fri Aug 17 18:23:21 2007
@@ -1434,7 +1434,7 @@
 
    Return *NULL* if an exception was raised by the codec.
 
-   .. versionadded:: 3.0
+   .. versionadded:: 2.6
 
 
 .. cfunction:: PyObject* PyUnicode_DecodeUTF32Stateful(const char *s, Py_ssize_t size, const char *errors, int *byteorder, Py_ssize_t *consumed)
@@ -1445,7 +1445,7 @@
    by four) as an error. Those bytes will not be decoded and the number of bytes
    that have been decoded will be stored in *consumed*.
 
-   .. versionadded:: 3.0
+   .. versionadded:: 2.6
 
 
 .. cfunction:: PyObject* PyUnicode_EncodeUTF32(const Py_UNICODE *s, Py_ssize_t size, const char *errors, int byteorder)
@@ -1466,6 +1466,8 @@
 
    Return *NULL* if an exception was raised by the codec.
 
+   .. versionadded:: 2.6
+
 
 .. cfunction:: PyObject* PyUnicode_AsUTF32String(PyObject *unicode)
 
@@ -1473,6 +1475,9 @@
    string always starts with a BOM mark.  Error handling is "strict".  Return
    *NULL* if an exception was raised by the codec.
 
+   .. versionadded:: 2.6
+
+
 These are the UTF-16 codec APIs:
 
 .. % --- UTF-16 Codecs ------------------------------------------------------ */

Modified: python/branches/py3k/Lib/encodings/utf_32.py
==============================================================================
--- python/branches/py3k/Lib/encodings/utf_32.py	(original)
+++ python/branches/py3k/Lib/encodings/utf_32.py	Fri Aug 17 18:23:21 2007
@@ -125,7 +125,7 @@
         if byteorder == -1:
             self.decode = codecs.utf_32_le_decode
         elif byteorder == 1:
-            self.decode = codecs.utf_32_le_decode
+            self.decode = codecs.utf_32_be_decode
         elif consumed>=4:
             raise UnicodeError,"UTF-32 stream does not start with BOM"
         return (object, consumed)


More information about the Python-3000-checkins mailing list