-
-
Notifications
You must be signed in to change notification settings - Fork 32.2k
bpo-24888: Clarify subprocess.check_call propagates exceptions if unable to start process #28018
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
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.
Thanks for implementing the changes.
FYI, if you haven't read this already, I highly recommend learning how to build the documentation locally https://devguide.python.org/documenting/#building-the-documentation to save yourself some time. That entire page also teaches basic reStructuredText, so I recommend reading it in full if you have the time.
Doc/library/subprocess.rst
Outdated
@@ -1150,6 +1150,11 @@ calls these functions. | |||
:exc:`CalledProcessError` object will have the return code in the | |||
:attr:`~CalledProcessError.returncode` attribute. | |||
|
|||
If :func:`check_call` was unable to start the process it will return the error |
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.
Will it return an error? or propagate whatever exception was raised?
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.
Actually I just notice there is duplication between this paragraph and the previous one.
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.
Shall we leave the rephrased version if it is more obvious?
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 think the original is more precise w.r.t the wrapped returncode value.
I would leave the original paragraph and just append to it a sentence or half-sentence about what happens if the child process could not even start. This order seems more natural to me: the common case is your job succeeded, then that your job failed, then the least common case is that your job could not even launch.
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've added the changes
GH-28223 is a backport of this pull request to the 3.9 branch. |
…ble to start process (pythonGH-28018) (cherry picked from commit 19a304b) Co-authored-by: DonnaDia <37962843+DonnaDia@users.noreply.github.com>
…ble to start process (pythonGH-28018) (cherry picked from commit 19a304b) Co-authored-by: DonnaDia <37962843+DonnaDia@users.noreply.github.com>
GH-28224 is a backport of this pull request to the 3.10 branch. |
https://bugs.python.org/issue24888