From: Antoine Pitrou Date: Sat, 4 Apr 2009 14:09:30 +0000 (+0000) Subject: Fix test_memoryio under Windows X-Git-Tag: v3.1a2~24 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=11446485433ad65111d6a10f716833c2455da5d1;p=python Fix test_memoryio under Windows --- diff --git a/Lib/_pyio.py b/Lib/_pyio.py index 66cdc20a0e..b2d17e9809 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)