[Python-checkins] python/dist/src/Misc NEWS, 1.1193.2.48, 1.1193.2.49

doerwalter at users.sourceforge.net doerwalter at users.sourceforge.net
Thu Apr 21 23:53:45 CEST 2005


Update of /cvsroot/python/python/dist/src/Misc
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv32723/Misc

Modified Files:
      Tag: release24-maint
	NEWS 
Log Message:
Backport checkin (and the appropriate fix to the test):
If the data read from the bytestream in readline() ends in a '\r' read one more
byte, even if the user has passed a size parameter. This extra byte shouldn't
cause a buffer overflow in the tokenizer. The original plan was to return a line
ending in '\r', which might be recognizable as a complete line and skip any '\n'
that was read afterwards. Unfortunately this didn't work, as the tokenizer only
recognizes '\n' as line ends, which in turn lead to joined lines and
SyntaxErrors, so this special treatment of a split '\r\n' has been dropped. (It
can only happen with a temporarily exhausted bytestream now anyway.)
Fixes parts of SF bugs #1163244 and #1175396.


Index: NEWS
===================================================================
RCS file: /cvsroot/python/python/dist/src/Misc/NEWS,v
retrieving revision 1.1193.2.48
retrieving revision 1.1193.2.49
diff -u -d -r1.1193.2.48 -r1.1193.2.49
--- NEWS	7 Apr 2005 10:19:47 -0000	1.1193.2.48
+++ NEWS	21 Apr 2005 21:53:28 -0000	1.1193.2.49
@@ -32,6 +32,12 @@
 - distutils.commands.register now encodes the data as UTF-8 before posting
   them to PyPI.
 
+- Partial fixes for SF bugs #1163244 and #1175396: If a chunk read by
+  ``codecs.StreamReader.readline()`` has a trailing "\r", read one more
+  character even if the user has passed a size parameter to get a proper
+  line ending. Remove the special handling of a "\r\n" that has been split
+  between two lines.
+
 
 What's New in Python 2.4.1 final?
 =================================



More information about the Python-checkins mailing list