]> granicus.if.org Git - python/commitdiff
Fix test_memoryio under Windows
authorAntoine Pitrou <solipsis@pitrou.net>
Sat, 4 Apr 2009 14:09:30 +0000 (14:09 +0000)
committerAntoine Pitrou <solipsis@pitrou.net>
Sat, 4 Apr 2009 14:09:30 +0000 (14:09 +0000)
Lib/_pyio.py

index 66cdc20a0eaed9f4309a3c6ccfb04e070488b9c6..b2d17e9809a0a2159ada6d14c508062e221e87f5 100644 (file)
@@ -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)