https://github.com/python/cpython/commit/be715d75c0f5b958bb0e3f3c682adbb25bee34dc
commit: be715d75c0f5b958bb0e3f3c682adbb25bee34dc
branch: main
author: Victor Stinner <[email protected]>
committer: vstinner <[email protected]>
date: 2026-05-25T22:54:01+02:00
summary:
gh-149879: Fix test_asyncio on Cygwin (#150416)
Skip tests on UNIX sockets since they hang on Cygwin.
files:
M Lib/asyncio/unix_events.py
M Lib/test/support/socket_helper.py
diff --git a/Lib/asyncio/unix_events.py b/Lib/asyncio/unix_events.py
index 915ff845249151c..4a638dc47ea21c8 100644
--- a/Lib/asyncio/unix_events.py
+++ b/Lib/asyncio/unix_events.py
@@ -835,7 +835,8 @@ class
_UnixSubprocessTransport(base_subprocess.BaseSubprocessTransport):
def _start(self, args, shell, stdin, stdout, stderr, bufsize, **kwargs):
stdin_w = None
- if stdin == subprocess.PIPE and sys.platform.startswith('aix'):
+ if (stdin == subprocess.PIPE
+ and (sys.platform.startswith('aix') or sys.platform == 'cygwin')):
# Use a socket pair for stdin on AIX, since it does not
# support selecting read events on the write end of a
# socket (which we use in order to detect closing of the
diff --git a/Lib/test/support/socket_helper.py
b/Lib/test/support/socket_helper.py
index a41e487f3e4bc52..66e5379d2c6e259 100644
--- a/Lib/test/support/socket_helper.py
+++ b/Lib/test/support/socket_helper.py
@@ -149,6 +149,8 @@ def skip_unless_bind_unix_socket(test):
"""Decorator for tests requiring a functional bind() for unix sockets."""
if not hasattr(socket, 'AF_UNIX'):
return unittest.skip('No UNIX Sockets')(test)
+ if sys.platform == 'cygwin':
+ return unittest.skip('UNIX sockets hang on Cygwin')(test)
global _bind_nix_socket_error
if _bind_nix_socket_error is None:
from .os_helper import TESTFN, unlink
_______________________________________________
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]