]> granicus.if.org Git - python/commit
Issue1395: Universal mode used to duplicate newlines when using read(1).
authorAmaury Forgeot d'Arc <amauryfa@gmail.com>
Mon, 19 Nov 2007 20:34:10 +0000 (20:34 +0000)
committerAmaury Forgeot d'Arc <amauryfa@gmail.com>
Mon, 19 Nov 2007 20:34:10 +0000 (20:34 +0000)
commit1ff9910f595c1f50e1590caf19e839a917657b36
tree407d598b311197be59ae6828d55b3d5dee4d6037
parent74c29c71b1c9a68030e6b3fda6af54ca52b2c6c3
Issue1395: Universal mode used to duplicate newlines when using read(1).

"Universal newline" is now an incremental decoder wrapping the initial one,
with its own additional buffer (if '\r' is seen at the end of the input).

A decoder allows the tell() funtion to record the state of the translation.
This also simplifies the readline() process.

Now test_netrc passes on Windows, as well as many new tests in test_io.py
Lib/io.py
Lib/test/test_io.py
Modules/_fileio.c