[issue1395] py3k: duplicated line endings when using read(1)
Raghuram Devarakonda
report at bugs.python.org
Tue Nov 6 17:12:19 CET 2007
Raghuram Devarakonda added the comment:
I am attaching the patch io.diff that does the following:
- If a chunk ends in "\r", read the next chunk to check if it starts
with "\n". This is obviously a very simplified solution that can be
optimized.
- invoke _replacenl on the complete string read instead of what is being
returned in each read call.
I also incorporated the test case by Amaury and added one more.
With this patch in place, the following tests failed (on SuSE 10.1):
test_doctest test_mailbox test_nis test_old_mailbox
test_pickletools test_pty test_sys
The failures (other than known test_mailbox and test_old_mailbox) didn't
look like they are caused by this fix.
Added file: http://bugs.python.org/file8703/io.diff
__________________________________
Tracker <report at bugs.python.org>
<http://bugs.python.org/issue1395>
__________________________________
-------------- next part --------------
A non-text attachment was scrubbed...
Name: io.diff
Type: text/x-patch
Size: 1965 bytes
Desc: not available
Url : http://mail.python.org/pipermail/python-bugs-list/attachments/20071106/3c8772c1/attachment.bin
More information about the Python-bugs-list
mailing list