bpo-14879: [doc] clarify how to check for errors from subprocess.Popen(..., shell=True)#26755
Conversation
* When shell=True, subprocess will exec /bin/bash [args], for example. * If the program is not found, the shell will not exit with a failure code, and the problem may go unnoticed at first.
Doc/library/subprocess.rst
Outdated
| The most common exception raised is :exc:`OSError`. This occurs, for example, | ||
| when trying to execute a non-existent file. Applications should prepare for | ||
| :exc:`OSError` exceptions. | ||
| :exc:`OSError` exceptions. Note that, when ``"shell=True"``, :exc:`OSError` will |
There was a problem hiding this comment.
please wrap the "will" so that the line does not exceed 80 chars.
There was a problem hiding this comment.
Ok, I have done that. In a separate additional commit I also went over the whole file line wrapping any other paragraphs that went over.
There was a problem hiding this comment.
Please remove the separate commit - it spams the diff and makes it hard to see what you changed.
In general we don't do sweeping fixes like that, but try not to add more formatting problems with the changes we commit.
There was a problem hiding this comment.
Ok, it's been reverted.
|
This PR is stale because it has been open for 30 days with no activity. |
|
@iritkatriel is there anyone else who can take a second look at this if @giampaolo is unavailable? |
|
Thanks @jdevries3133 for the PR, and @iritkatriel for merging it 🌮🎉.. I'm working now to backport this PR to: 3.10, 3.9. |
|
GH-27288 is a backport of this pull request to the 3.10 branch. |
…n(..., shell=True) (pythonGH-26755) (cherry picked from commit 50ffbe3) Co-authored-by: Jack DeVries <58614260+jdevries3133@users.noreply.github.com>
|
GH-27289 is a backport of this pull request to the 3.9 branch. |
…n(..., shell=True) (pythonGH-26755) (cherry picked from commit 50ffbe3) Co-authored-by: Jack DeVries <58614260+jdevries3133@users.noreply.github.com>
code (rather than raise an exception), and the problem may go unnoticed at first.
I added the exact sentence @ncoghlan put at the end of the bpo thread.
https://bugs.python.org/issue14879