[Python-checkins] python/dist/src/Lib/encodings __init__.py, 1.8.2.2, 1.8.2.3 aliases.py, 1.13.2.2, 1.13.2.3 idna.py, 1.2.4.2, 1.2.4.3 utf_16.py, 1.3.2.2, 1.3.2.3
jhylton@users.sourceforge.net
jhylton at users.sourceforge.net
Sun Oct 16 07:24:33 CEST 2005
Update of /cvsroot/python/python/dist/src/Lib/encodings
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv27718/Lib/encodings
Modified Files:
Tag: ast-branch
__init__.py aliases.py idna.py utf_16.py
Log Message:
Merge head to branch (for the last time)
Index: __init__.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/encodings/__init__.py,v
retrieving revision 1.8.2.2
retrieving revision 1.8.2.3
diff -u -d -r1.8.2.2 -r1.8.2.3
--- __init__.py 7 Jan 2005 06:58:21 -0000 1.8.2.2
+++ __init__.py 16 Oct 2005 05:24:00 -0000 1.8.2.3
@@ -27,7 +27,7 @@
"""#"
-import codecs, exceptions, types, aliases
+import codecs, types, aliases
_cache = {}
_unknown = '--unknown--'
@@ -40,8 +40,7 @@
' ')
_aliases = aliases.aliases
-class CodecRegistryError(exceptions.LookupError,
- exceptions.SystemError):
+class CodecRegistryError(LookupError, SystemError):
pass
def normalize_encoding(encoding):
Index: aliases.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/encodings/aliases.py,v
retrieving revision 1.13.2.2
retrieving revision 1.13.2.3
diff -u -d -r1.13.2.2 -r1.13.2.3
--- aliases.py 7 Jan 2005 06:58:36 -0000 1.13.2.2
+++ aliases.py 16 Oct 2005 05:24:00 -0000 1.13.2.3
@@ -482,6 +482,7 @@
# utf_7 codec
'u7' : 'utf_7',
'utf7' : 'utf_7',
+ 'unicode_1_1_utf_7' : 'utf_7',
# utf_8 codec
'u8' : 'utf_8',
Index: idna.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/encodings/idna.py,v
retrieving revision 1.2.4.2
retrieving revision 1.2.4.3
diff -u -d -r1.2.4.2 -r1.2.4.3
--- idna.py 7 Jan 2005 06:58:36 -0000 1.2.4.2
+++ idna.py 16 Oct 2005 05:24:00 -0000 1.2.4.3
@@ -149,6 +149,9 @@
# IDNA is quite clear that implementations must be strict
raise UnicodeError, "unsupported error handling "+errors
+ if not input:
+ return "", 0
+
result = []
labels = dots.split(input)
if labels and len(labels[-1])==0:
@@ -166,6 +169,9 @@
if errors != 'strict':
raise UnicodeError, "Unsupported error handling "+errors
+ if not input:
+ return u"", 0
+
# IDNA allows decoding to operate on Unicode strings, too.
if isinstance(input, unicode):
labels = dots.split(input)
Index: utf_16.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/encodings/utf_16.py,v
retrieving revision 1.3.2.2
retrieving revision 1.3.2.3
diff -u -d -r1.3.2.2 -r1.3.2.3
--- utf_16.py 7 Jan 2005 06:58:36 -0000 1.3.2.2
+++ utf_16.py 16 Oct 2005 05:24:00 -0000 1.3.2.3
@@ -31,6 +31,13 @@
class StreamReader(codecs.StreamReader):
+ def reset(self):
+ codecs.StreamReader.reset(self)
+ try:
+ del self.decode
+ except AttributeError:
+ pass
+
def decode(self, input, errors='strict'):
(object, consumed, byteorder) = \
codecs.utf_16_ex_decode(input, errors, 0, False)
More information about the Python-checkins
mailing list