-
-
Notifications
You must be signed in to change notification settings - Fork 33.7k
gh-113119 fix environment handling in subprocess.Popen when posix_spawn is used #113120
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
With this change, posix_spawn call can behave similarly to execv with regards to environments when used in subprocess functions.
gpshead
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The code looks good, can you add a NEWS entry (step 8 in https://devguide.python.org/) and mention the os.posix_spawn feature of accepting env=None to mean "use the current process environment" in Doc/whatsnew/3.13.rst?
|
Thanks for the review. I added a NEWS fragment and whatsnew entry as per your suggestion. |
…ix_spawn is used (python#113120) * Allow posix_spawn to inherit environment form parent environ variable. With this change, posix_spawn call can behave similarly to execv with regards to environments when used in subprocess functions.
…ix_spawn is used (python#113120) * Allow posix_spawn to inherit environment form parent environ variable. With this change, posix_spawn call can behave similarly to execv with regards to environments when used in subprocess functions.
`env` can be `None` since 3.13, see python/cpython#113120
Fixes #113119 .
📚 Documentation preview 📚: https://cpython-previews--113120.org.readthedocs.build/