Skip to content

[3.15] gh-152548: Add options, env and timeout parameters to runInSubprocess() (GH-155163) - #155238

Merged
serhiy-storchaka merged 1 commit into
python:3.15from
serhiy-storchaka:backport-1d90627-3.15
Oct 9, 2026
Merged

serhiy-storchaka merged 1 commit into
python:3.15from
serhiy-storchaka:backport-1d90627-3.15

Conversation

@serhiy-storchaka

Copy link
Copy Markdown
Member

Manual backport of GH-155163; miss-islington could not apply it cleanly because
GH-155167 (the backport of GH-155162) has not landed on 3.15 yet. This branch is
based on GH-155167 and should be merged after it.

Add three keyword-only parameters to runInSubprocess():

  • options -- interpreter command line options for the subprocess.
  • env -- environment variables, on top of the inherited environment; a value
    of None unsets a variable.
  • timeout -- how long to wait for the subprocess; the test is reported as an
    error if it does not complete in time. There is no timeout by default.

(cherry picked from commit 1d90627)

…rocess() (pythonGH-155163)

They run the test subprocess with specific interpreter command line options
and environment variables, and limit how long it may take.  All are
keyword-only.  env is layered over the inherited environment; a None value
unsets a variable.  There is no timeout by default.
(cherry picked from commit 1d90627)

Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
@bedevere-app bedevere-app Bot added the type-feature A feature request or enhancement label Oct 9, 2026
@serhiy-storchaka
serhiy-storchaka enabled auto-merge (squash) October 9, 2026 20:07
@serhiy-storchaka serhiy-storchaka removed the type-feature A feature request or enhancement label Oct 9, 2026
@serhiy-storchaka
serhiy-storchaka merged commit 1de261a into python:3.15 Oct 9, 2026
55 of 57 checks passed
@serhiy-storchaka
serhiy-storchaka deleted the backport-1d90627-3.15 branch November 25, 2026 11:28
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.

1 participant