From 1441f2f7351f030ba07c6c6b11be513ad1c9104f Mon Sep 17 00:00:00 2001 From: Victor Stinner Date: Fri, 15 May 2026 23:11:09 +0200 Subject: [PATCH] gh-149879: Don't import msvcrt in _pyio on Cygwin (#149899) The msvcrt extension module cannot be built on Cygwin. --- Lib/_pyio.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Lib/_pyio.py b/Lib/_pyio.py index 3306c8a27476..1b5b75ef566a 100644 --- a/Lib/_pyio.py +++ b/Lib/_pyio.py @@ -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 -- 2.47.3