Accept path-like subprocess args (Python 3.8 compatibility)#329
Merged
1st1 merged 1 commit intoMagicStack:masterfrom May 16, 2020
Merged
Conversation
1st1
approved these changes
May 13, 2020
Member
|
Could you please squash all commits and rebase against master? |
* Also add subprocess test case using Path object * uvloop already handles path-like cwd correctly, so I just copy-and-pasted the same logic to _init_args() method. * The standard library uses "isinstance(obj, os.PathLike)" to check if an object is path-like, but os.PathLike exists as of Python 3.6. Since uvloop needs to support Python 3.5, we should use manual check for existence of the __fspath__ attribute. * According to the official Python documentation: - https://docs.python.org/3/library/subprocess.html#subprocess.Popen The subprocess.Popen() constructor support path-like objects since Python 3.6 on POSIX and since Python 3.8 on Windows. - https://docs.python.org/3/library/asyncio-eventloop.html#asyncio.loop.subprocess_exec This page does not mention about path-like objects, but as of Python 3.8, it DOES support path-like objects.
22bb71f to
41a1ef8
Compare
Contributor
Author
|
I've rebased and squashed the branch. |
Member
|
Thank you! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
This PR resolves #328.