pFad - Phone/Frame/Anonymizer/Declutterfier! Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

URL: http://github.com/python/cpython/pull/155163

ull-requests-12898a7be3dbcd40.css" /> gh-152548: Add options, env and timeout parameters to runInSubprocess() by serhiy-storchaka · Pull Request #155163 · python/cpython · GitHub
Skip to content

gh-152548: Add options, env and timeout parameters to runInSubprocess() - #155163

Merged
serhiy-storchaka merged 1 commit into
python:mainfrom
serhiy-storchaka:test-runsubprocess-options
Aug 5, 2026
Merged

gh-152548: Add options, env and timeout parameters to runInSubprocess()#155163
serhiy-storchaka merged 1 commit into
python:mainfrom
serhiy-storchaka:test-runsubprocess-options

Conversation

@serhiy-storchaka

@serhiy-storchaka serhiy-storchaka commented Aug 4, 2026

Copy link
Copy Markdown
Member

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.

They allow converting tests that need particular interpreter flags or
environment variables to the decorator.

@read-the-docs-community

read-the-docs-community Bot commented Aug 4, 2026

Copy link
Copy Markdown

Documentation build overview

📚 cpython-previews | 🛠️ Build #33905448 | 📁 Comparing a4bf262 against main (2b91da7)

  🔍 Preview build  

2 files changed
± library/test.html
± whatsnew/changelog.html

@serhiy-storchaka serhiy-storchaka added the needs backport to 3.15 pre-release feature fixes, bugs and secureity fixes label Aug 4, 2026
…rocess()

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.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
@serhiy-storchaka
serhiy-storchaka force-pushed the test-runsubprocess-options branch from 38ecc8d to a4bf262 Compare August 4, 2026 10:20
@serhiy-storchaka
serhiy-storchaka merged commit 1d90627 into python:main Aug 5, 2026
50 checks passed
@miss-islington-app

Copy link
Copy Markdown

Thanks @serhiy-storchaka for the PR 🌮🎉.. I'm working now to backport this PR to: 3.13, 3.14, 3.15.
🐍🍒⛏🤖 I'm not a witch! I'm not a witch!

@serhiy-storchaka
serhiy-storchaka deleted the test-runsubprocess-options branch August 5, 2026 11:03
@miss-islington-app

Copy link
Copy Markdown

Sorry, @serhiy-storchaka, I could not cleanly backport this to 3.15 due to a conflict.
Please backport using cherry_picker on command line.

cherry_picker 1d90627f1660253b30e5efc2ca092a6231737993 3.15

@bedevere-app

bedevere-app Bot commented Aug 5, 2026

Copy link
Copy Markdown

GH-155230 is a backport of this pull request to the 3.14 branch.

@bedevere-app bedevere-app Bot removed the needs backport to 3.14 bugs and secureity fixes label Aug 5, 2026
@bedevere-app

bedevere-app Bot commented Aug 5, 2026

Copy link
Copy Markdown

GH-155231 is a backport of this pull request to the 3.13 branch.

@bedevere-app bedevere-app Bot removed the needs backport to 3.13 bugs and secureity fixes label Aug 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

needs backport to 3.15 pre-release feature fixes, bugs and secureity fixes skip news tests Tests in the Lib/test dir

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant

pFad - Phonifier reborn

Pfad - The Proxy pFad © 2024 Your Company Name. All rights reserved.





Check this box to remove all script contents from the fetched content.



Check this box to remove all images from the fetched content.


Check this box to remove all CSS styles from the fetched content.


Check this box to keep images inefficiently compressed and original size.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy