]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
gh-149879: Don't import msvcrt in _pyio on Cygwin (#149899)
authorVictor Stinner <vstinner@python.org>
Fri, 15 May 2026 21:11:09 +0000 (23:11 +0200)
committerGitHub <noreply@github.com>
Fri, 15 May 2026 21:11:09 +0000 (21:11 +0000)
The msvcrt extension module cannot be built on Cygwin.

Lib/_pyio.py

index 3306c8a274760be525c89d7ae9fd29a4b4216e36..1b5b75ef566a32b01719a97076a1d67aceb10f19 100644 (file)
@@ -10,7 +10,7 @@ import stat
 import sys
 # Import _thread instead of threading to reduce startup cost
 from _thread import allocate_lock as Lock
-if sys.platform in {'win32', 'cygwin'}:
+if sys.platform == 'win32':
     from msvcrt import setmode as _setmode
 else:
     _setmode = None