Skip to content
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-31961: subprocess.run() now accepts path-like args #4329

Merged
merged 8 commits into from Jan 30, 2018

Conversation

Projects
None yet
4 participants
@Phaqui
Copy link
Contributor

commented Nov 8, 2017

As per bpo-31961, if the args argument of subprocess.run() was a path-like object, TypeError would raised. If the args argument was a sequence where the first element was a path-like object, it would work on posix, but not on windows. Both of these issues are resolved in this PR.

https://bugs.python.org/issue31961

add comments to the new os.PathLike logic
to better explain it.

there may be better ways to write this, but this plus the comments will do for now.

I don't really _like_ catching TypeError. It's too generic.

@gpshead gpshead self-assigned this Jan 30, 2018

@gpshead gpshead merged commit dd42cb7 into python:master Jan 30, 2018

4 checks passed

bedevere/issue-number Issue number 31961 found
Details
bedevere/news News entry found in Misc/NEWS.d
continuous-integration/appveyor/pr AppVeyor build succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details

serhiy-storchaka added a commit to serhiy-storchaka/cpython that referenced this pull request Feb 26, 2018

miss-islington added a commit to miss-islington/cpython that referenced this pull request Feb 27, 2018

Revert "bpo-31961: subprocess now accepts path-like args (pythonGH-4329
…)" (pythonGH-5912)

* Revert "bpo-31961: subprocess now accepts path-like args (pythonGH-4329)"

This reverts commit dd42cb7.
(cherry picked from commit be50a7b)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>

ned-deily added a commit that referenced this pull request Feb 27, 2018

Revert "bpo-31961: subprocess now accepts path-like args (GH-4329)" (#…
…5912)

* Revert "bpo-31961: subprocess now accepts path-like args (GH-4329)"

This reverts commit dd42cb7.

ned-deily added a commit that referenced this pull request Feb 27, 2018

Revert "bpo-31961: subprocess now accepts path-like args (GH-4329)" (G…
…H-5912) (GH-5931)

* Revert "bpo-31961: subprocess now accepts path-like args (GH-4329)"

This reverts commit dd42cb7.
(cherry picked from commit be50a7b)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>

serhiy-storchaka added a commit to serhiy-storchaka/cpython that referenced this pull request Feb 28, 2018

yahya-abou-imran added a commit to yahya-abou-imran/cpython that referenced this pull request Nov 2, 2018

Revert "bpo-31961: subprocess now accepts path-like args (pythonGH-4329
…)" (python#5912)

* Revert "bpo-31961: subprocess now accepts path-like args (pythonGH-4329)"

This reverts commit dd42cb7.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.