Kaydet (Commit) f0f55a00 authored tarafından Serhiy Storchaka's avatar Serhiy Storchaka

Issue #24881: Fixed setting binary mode in Python implementation of FileIO

on Windows and Cygwin.  Patch from Akira Li.
üst 079fc7fa
...@@ -8,12 +8,13 @@ import codecs ...@@ -8,12 +8,13 @@ import codecs
import errno import errno
import array import array
import stat import stat
import sys
# Import _thread instead of threading to reduce startup cost # Import _thread instead of threading to reduce startup cost
try: try:
from _thread import allocate_lock as Lock from _thread import allocate_lock as Lock
except ImportError: except ImportError:
from _dummy_thread import allocate_lock as Lock from _dummy_thread import allocate_lock as Lock
if os.name == 'win32': if sys.platform in {'win32', 'cygwin'}:
from msvcrt import setmode as _setmode from msvcrt import setmode as _setmode
else: else:
_setmode = None _setmode = None
......
...@@ -14,6 +14,9 @@ Core and Builtins ...@@ -14,6 +14,9 @@ Core and Builtins
Library Library
------- -------
- Issue #24881: Fixed setting binary mode in Python implementation of FileIO
on Windows and Cygwin. Patch from Akira Li.
- Issue #21112: Fix regression in unittest.expectedFailure on subclasses. - Issue #21112: Fix regression in unittest.expectedFailure on subclasses.
Patch from Berker Peksag. Patch from Berker Peksag.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment