GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — bpo-31961: subprocess.run() now accepts path-like args by Phaqui · Pull Request #4329 · python/cpython

Conversation

@Phaqui

@Phaqui Phaqui commented Nov 8, 2017 •
edited by bedevere-bot
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor

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

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Phaqui added 6 commits November 7, 2017 19:56
@Phaqui
Added a failing test and the fix for it on non-windows
59413e7
@Phaqui
Implemented windows test and fix
e348a0c
@Phaqui
Updated documentation for subprocess.Popen to reflect that it now wor…
79b6da8
…ks with pathlike objects
@Phaqui
Added NEWS.d/next/ entry
a65bf70
@Phaqui
Updated second test slightly
42c06a2
@Phaqui
Simplified pathlike_with_arguments test
b444e40
@Phaqui
Phaqui requested a review from gpshead as a code owner November 8, 2017 03:45
@the-knights-who-say-ni the-knights-who-say-ni added the CLA signed label Nov 8, 2017
@bedevere-bot bedevere-bot added the awaiting review label Nov 8, 2017
@gpshead
add comments to the new os.PathLike logic
efffc2a
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
Merge branch 'master' into fix-issue-31961
b70c0ae
@gpshead
gpshead merged commit dd42cb7 into python:master Jan 30, 2018
@bedevere-bot bedevere-bot removed the awaiting review label Jan 30, 2018
serhiy-storchaka added a commit to serhiy-storchaka/cpython that referenced this pull request Feb 26, 2018
@serhiy-storchaka
Revert "bpo-31961: subprocess now accepts path-like args (pythonGH-4329…
ef212f0
…)"

This reverts commit dd42cb7.
miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Feb 27, 2018
@serhiy-storchaka @miss-islington
Revert "bpo-31961: subprocess now accepts path-like args (pythonGH-4329…
d6ce482
…)" (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]>
@miss-islington miss-islington mentioned this pull request Feb 27, 2018
[3.7] Revert "bpo-31961: subprocess now accepts path-like args" (GH-5912) #5931
Merged
ned-deily pushed a commit that referenced this pull request Feb 27, 2018
@serhiy-storchaka @ned-deily
Revert "bpo-31961: subprocess now accepts path-like args (GH-4329)" (#…
be50a7b
…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
@miss-islington @serhiy-storchaka @ned-deily
Revert "bpo-31961: subprocess now accepts path-like args (GH-4329)" (G…
b7dcae3
…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
@serhiy-storchaka
Revert "Revert "bpo-31961: subprocess now accepts path-like args (pyt…
0b4e876
…honGH-4329)" (python#5912)"

This reverts commit be50a7b.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@gpshead gpshead Awaiting requested review from gpshead

Uh oh!

There was an error while loading. Please reload this page.

Assignees

@gpshead gpshead

Labels

type-feature A feature request or enhancement

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

4 participants

@Phaqui @gpshead @the-knights-who-say-ni @bedevere-bot
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.