Skip to content

Conversation

@Phaqui
Copy link
Contributor

@Phaqui Phaqui 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

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 added the type-feature A feature request or enhancement label Jan 30, 2018
@gpshead gpshead self-assigned this Jan 30, 2018
@gpshead gpshead merged commit dd42cb7 into python:master Jan 30, 2018
serhiy-storchaka added a commit to serhiy-storchaka/cpython that referenced this pull request Feb 26, 2018
miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Feb 27, 2018
…)" (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 <[email protected]>
ned-deily pushed a commit that referenced this pull request Feb 27, 2018
…5912)

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

This reverts commit dd42cb7.
ned-deily pushed a commit that referenced this pull request Feb 27, 2018
…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 <[email protected]>
serhiy-storchaka added a commit to serhiy-storchaka/cpython that referenced this pull request Feb 28, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

type-feature A feature request or enhancement

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants