Skip to content

[3.13] gh-146004: propagate all -X options to multiprocessing child processes (GH-146005) - #155938

Merged
hugovk merged 1 commit into
python:3.13from
danielKim614:backport-1efe441-3.13
Aug 17, 2026
Merged

[3.13] gh-146004: propagate all -X options to multiprocessing child processes (GH-146005)#155938
hugovk merged 1 commit into
python:3.13from
danielKim614:backport-1efe441-3.13

Conversation

@danielKim614

@danielKim614 danielKim614 commented Aug 17, 2026

Copy link
Copy Markdown
Contributor

Propagate all -X command line options to multiprocessing spawned child Python processes. (cherry picked from commit 1efe441)

…hild processes (pythonGH-146005)

Propagate all -X command line options to multiprocessing spawned child Python processes.
(cherry picked from commit 1efe441)

Co-authored-by: Gregory P. Smith <68491+gpshead@users.noreply.github.com>
@danielKim614

Copy link
Copy Markdown
Contributor Author

Hi @corona10 @hugovk, this is a manual 3.13 backport of GH-146005 as part of the PyCon KR sprint (the bot couldn't backport it cleanly because of a conflict).

@hugovk hugovk left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! 🚀

@github-project-automation github-project-automation Bot moved this from Todo to In Progress in Sprint Aug 17, 2026
@hugovk
hugovk enabled auto-merge (squash) August 17, 2026 06:40
@hugovk
hugovk merged commit d3f5290 into python:3.13 Aug 17, 2026
47 checks passed
@github-project-automation github-project-automation Bot moved this from In Progress to Done in Sprint Aug 17, 2026
@chris-eibl

Copy link
Copy Markdown
Member

This broke some Windows build bots. I've triggered a backport of #146580, which should fix it: #155965

child processes spawned by :mod:`multiprocessing`, not just a hard-coded
subset. This makes the behavior consistent between default "spawn" and
"forkserver" start methods and the old "fork" start method. The options
that were previously not propagated are: ``context_aware_warnings``,

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Strictly speaking, not all of these apply to 3.13, for examply lazy_imports is 3.15. We haven't been that picky in the 3.14 backport, either, and the tests pass, because unsupported -X options are just silently ignored.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for catching this and for opening #155965!
Using os_helper.temp_dir() should make the test portable on Windows.
Good point about the version-specific options as well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

5 participants