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
bpo-35537: Document posix_spawn() change in subprocess #11668
Conversation
Doc/library/subprocess.rst
Outdated
@@ -567,6 +567,13 @@ functions. | |||
Popen destructor now emits a :exc:`ResourceWarning` warning if the child | |||
process is still running. | |||
|
|||
.. versionchanged:: 3.8 | |||
Popen can now use :func:`os.posix_spawn` in some cases for better |
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.
What about if we say: Now, Popen can use ... ```` or just remove the
now``` .
Just a suggestion
Doc/library/subprocess.rst
Outdated
@@ -567,6 +567,13 @@ functions. | |||
Popen destructor now emits a :exc:`ResourceWarning` warning if the child | |||
process is still running. | |||
|
|||
.. versionchanged:: 3.8 | |||
Popen can now use :func:`os.posix_spawn` in some cases for better | |||
performance. On some very specific platforms, Popen constructor using |
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.
Can you mention some example of that platforms?
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.
I prefer to not mention WSL and QEMU User Emulation since it's a bug and these bugs can be fixed whenever. I prefer to not mention them to be more future-proof (not have to update the doc).
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.
I'd mention the platforms anyways with a "at the time of this writing, buggy platforms we are aware of include Windows Subsystem for Linux (version XYZ) and QEMU (version XYZ)" ... If there are bugreports filed against them, those can be linked to from the doc as well.
Otherwise it such text sets off alarm bells for anyone reading it, they'll have the same question: am I impacted? do I use any "very specific platforms"? and come seeking more information.
when we become aware of upstream bugs being fixed we can update the text to say "versions prior to ABC" or similar.
@izbyshev: Would you mind to review this change? Are you fine with documentating the limitation rather trying to fixing it? |
@vstinner I hope that problems with QEMU, WSL and any other Linux environments where Personally, I'd wait at least until we're done with bpo-35823. If it's merged, I'd prefer not to merge a part about "very specific platforms" and wait until we encounter another such case. If it's rejected, I agree that we should document this issue. Also, we could add a parameter to |
Ok, let's do that ;-) |
@izbyshev: More generally, I like how things are going one. Slowly, we listed more and more bugs and corner cases, and we had to experiment posix_spawn() and dig into the code (well, in practice that part mostly done by you @izbyshev :-D) to be able to get this list. I'm fine with dropping posix_spawn() from subprocess if we can successfully use vfork in _posixsubprocess. I'm open to different options, as soon as subprocess runs faster :-) |
Document that subprocess.Popen no longer raise an exception on error like missing program on very specific platforms when using os.posix_spawn() is used.
Document that subprocess.Popen no longer raise an exception on error
like missing program on very specific platforms when using
os.posix_spawn() is used.
https://bugs.python.org/issue35537