diff options
author | Antoine Pitrou <solipsis@pitrou.net> | 2009-04-04 14:09:30 (GMT) |
---|---|---|
committer | Antoine Pitrou <solipsis@pitrou.net> | 2009-04-04 14:09:30 (GMT) |
commit | 11446485433ad65111d6a10f716833c2455da5d1 (patch) | |
tree | 073d6f78f072fa33e5374bed66ed0099e51c04de | |
parent | 8e3305127242feec58d8874742b2078545adfadd (diff) | |
download | cpython-11446485433ad65111d6a10f716833c2455da5d1.zip cpython-11446485433ad65111d6a10f716833c2455da5d1.tar.gz cpython-11446485433ad65111d6a10f716833c2455da5d1.tar.bz2 |
Fix test_memoryio under Windows
-rw-r--r-- | Lib/_pyio.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/Lib/_pyio.py b/Lib/_pyio.py index 66cdc20..b2d17e9 100644 --- a/Lib/_pyio.py +++ b/Lib/_pyio.py @@ -1829,6 +1829,10 @@ class StringIO(TextIOWrapper): encoding="utf-8", errors="strict", newline=newline) + # Issue #5645: make universal newlines semantics the same as in the + # C version, even under Windows. + if newline is None: + self._writetranslate = False if initial_value: if not isinstance(initial_value, str): initial_value = str(initial_value) |