From 7addb4fbc494b9c2e9b3c031c131933db9628139 Mon Sep 17 00:00:00 2001 From: Victor Stinner Date: Fri, 15 May 2026 22:10:53 +0200 Subject: [PATCH] gh-149879: Don't import msvcrt in _pyio on Cygwin 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 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