mirror of
https://github.com/python/cpython.git
synced 2025-10-17 12:18:23 +00:00
Fix test_memoryio under Windows
This commit is contained in:
parent
8e33051272
commit
1144648543
1 changed files with 4 additions and 0 deletions
|
@ -1829,6 +1829,10 @@ class StringIO(TextIOWrapper):
|
||||||
encoding="utf-8",
|
encoding="utf-8",
|
||||||
errors="strict",
|
errors="strict",
|
||||||
newline=newline)
|
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 initial_value:
|
||||||
if not isinstance(initial_value, str):
|
if not isinstance(initial_value, str):
|
||||||
initial_value = str(initial_value)
|
initial_value = str(initial_value)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue