FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

[3.11] gh-109888: Fix test_os _kill_with_event() on Windows (GH-110421) by miss-islington · Pull Request #110443 · python/cpython · GitHub

/ cpython Public

[3.11] gh-109888: Fix test_os _kill_with_event() on Windows (GH-110421) - #110443

Merged
vstinner merged 1 commit into
python:3.11from
miss-islington:backport-aaf297c-3.11
Oct 5, 2023
Merged

[3.11] gh-109888: Fix test_os _kill_with_event() on Windows (GH-110421)#110443
vstinner merged 1 commit into
python:3.11from
miss-islington:backport-aaf297c-3.11

Conversation

miss-islington commented Oct 5, 2023
edited by bedevere-app Bot
Loading

Copy link
Copy Markdown
Contributor

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 aaf297c)

Co-authored-by: Victor Stinner vstinner@python.org

…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 aaf297c)

Co-authored-by: Victor Stinner <vstinner@python.org>
bedevere-app Bot added tests Tests in the Lib/test dir awaiting review labels Oct 5, 2023
vstinner enabled auto-merge (squash) October 5, 2023 21:41
vstinner merged commit 67129c3 into python:3.11 Oct 5, 2023
miss-islington deleted the backport-aaf297c-3.11 branch October 5, 2023 22:06
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

skip news tests Tests in the Lib/test dir

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants


Back | FazBrowse Home | New Git URL