https://github.com/python/cpython/commit/1441f2f7351f030ba07c6c6b11be513ad1c9104f
commit: 1441f2f7351f030ba07c6c6b11be513ad1c9104f
branch: main
author: Victor Stinner <[email protected]>
committer: vstinner <[email protected]>
date: 2026-05-15T21:11:09Z
summary:

gh-149879: Don't import msvcrt in _pyio on Cygwin (#149899)

The msvcrt extension module cannot be built on Cygwin.

files:
M Lib/_pyio.py

diff --git a/Lib/_pyio.py b/Lib/_pyio.py
index 3306c8a274760b..1b5b75ef566a32 100644
--- a/Lib/_pyio.py
+++ b/Lib/_pyio.py
@@ -10,7 +10,7 @@
 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

_______________________________________________
Python-checkins mailing list -- [email protected]
To unsubscribe send an email to [email protected]
https://mail.python.org/mailman3//lists/python-checkins.python.org
Member address: [email protected]

Reply via email to