bpo-24888: Clarify subprocess.check_call propagates exceptions if unable to start process#28018
bpo-24888: Clarify subprocess.check_call propagates exceptions if unable to start process#28018
Conversation
Fidget-Spinner
left a comment
There was a problem hiding this comment.
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.
| :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.
Will it return an error? or propagate whatever exception was raised?
There was a problem hiding this comment.
Actually I just notice there is duplication between this paragraph and the previous one.
There was a problem hiding this comment.
Shall we leave the rephrased version if it is more obvious?
There was a problem hiding this comment.
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.
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