diff options
| author | Miss Islington (bot) <31488909+miss-islington@users.noreply.github.com> | 2023-10-05 22:06:28 (GMT) |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-10-05 22:06:28 (GMT) |
| commit | 67129c379cdfc7e880bc1cfdef3df1f562c94853 (patch) | |
| tree | d3d8bda1cd87546c2658c05761741814d42efd2d /Lib/idlelib/replace.py | |
| parent | 4134036ce9673b76cc8e6236361a77098ee72ad1 (diff) | |
| download | cpython-67129c379cdfc7e880bc1cfdef3df1f562c94853.zip cpython-67129c379cdfc7e880bc1cfdef3df1f562c94853.tar.gz cpython-67129c379cdfc7e880bc1cfdef3df1f562c94853.tar.bz2 | |
[3.11] gh-109888: Fix test_os _kill_with_event() on Windows (GH-110421) (#110443)
gh-109888: Fix test_os _kill_with_event() on Windows (GH-110421)
Replace os.kill() with proc.kill() which catchs PermissionError.
Rewrite _kill_with_event():
* Use subprocess context manager ("with proc:").
* Use sleeping_retry() to wait until the child process is ready.
* Replace SIGINT with proc.kill() on error.
* Replace 10 seconds with SHORT_TIMEOUT to wait until the process is
ready.
* Replace 0.5 seconds with SHORT_TIMEOUT to wait for the process
exit.
(cherry picked from commit aaf297c048694cd9652790f8b74e69f7ddadfbde)
Co-authored-by: Victor Stinner <vstinner@python.org>
Diffstat (limited to 'Lib/idlelib/replace.py')
0 files changed, 0 insertions, 0 deletions
