]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
[3.11] gh-109709: Fix asyncio test_stdin_broken_pipe() (#109710) (#109735)
authorVictor Stinner <vstinner@python.org>
Fri, 22 Sep 2023 14:34:53 +0000 (16:34 +0200)
committerGitHub <noreply@github.com>
Fri, 22 Sep 2023 14:34:53 +0000 (14:34 +0000)
commit1629b1d6f96b377d3ae8e6b6e35e6ffd304f0cd7
treeddccd8ef452ace71a044db20fbed3d5c8b9b22b8
parentf45ef5edabb1cc0748f3326e7114b8aaa0424392
[3.11] gh-109709: Fix asyncio test_stdin_broken_pipe() (#109710) (#109735)

gh-109709: Fix asyncio test_stdin_broken_pipe() (#109710)

Replace harcoded sleep of 500 ms with synchronization using a pipe.

Fix also Process._feed_stdin(): catch also BrokenPipeError on
stdin.write(input), not only on stdin.drain().

(cherry picked from commit cbbdf2c1440c804adcfc32ea0470865b3b3b8eb2)
Lib/asyncio/subprocess.py
Lib/test/test_asyncio/test_subprocess.py