[proxy] web.archive.org← back | site home | direct (HTTPS) ↗ | proxy home | ◑ dark◐ light
/ cpython Public
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-35246: fix support for path-like args in asyncio subprocess #13628

Merged
merged 4 commits into from May 29, 2019

Conversation

Copy link
Contributor

lilydjwg commented May 28, 2019

Drop isinstance checks from create_subprocess_exec function and let
subprocess module do them.

https://bugs.python.org/issue35246

https://bugs.python.org/issue35246

drop isinstance checks from create_subprocess_exec function and let
subprocess module do them.
Copy link

the-knights-who-say-ni commented May 28, 2019

Hello, and thanks for your contribution!

I'm a bot set up to make sure that the project can legally accept your contribution by verifying you have signed the PSF contributor agreement (CLA).

Our records indicate we have not received your CLA. For legal reasons we need you to sign this before we can look at your contribution. Please follow the steps outlined in the CPython devguide to rectify this issue.

If you have recently signed the CLA, please wait at least one business day
before our records are updated.

You can check yourself to see if the CLA has been received.

Thanks again for your contribution, we look forward to reviewing it!

sys.executable, '-c', 'pass', Path('.'))
await p.wait()

self.loop.run_until_complete(execute())
Copy link
Contributor

asvetlov May 28, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please add self.assertIsNone(loop.run_until_complete(...)) check to emphasize that we checked that the test passed correctly.

@@ -622,6 +622,18 @@ def test_create_subprocess_shell_text_mode_fails(self):
self.loop.run_until_complete(execute())


def test_create_subprocess_exec_with_path(self):
async def execute():
from pathlib import Path
Copy link
Contributor

asvetlov May 28, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Move the import to the top of the module.
Use import pathlib form and pathlib.Path for consistency.

Copy link

bedevere-bot commented May 28, 2019

A Python core developer has requested some changes be made to your pull request before we can consider merging it. If you could please address their requests along with any other requests in other reviews from core developers that would be appreciated.

Once you have made the requested changes, please leave a comment on this pull request containing the phrase I have made the requested changes; please review again. I will then notify any core developers who have left a review that you're ready for them to take another look at this pull request.

Copy link
Contributor Author

lilydjwg commented May 28, 2019

I have made the requested changes; please review again.

BTW the Windows CI errors should be resolved by #5914.

Copy link

bedevere-bot commented May 28, 2019

Thanks for making the requested changes!

@asvetlov: please review the changes made to this pull request.

Copy link
Contributor

asvetlov left a comment

Please take a look on failed test on Windows: https://ci.appveyor.com/project/python/cpython/builds/24869318

Copy link

bedevere-bot commented May 28, 2019

A Python core developer has requested some changes be made to your pull request before we can consider merging it. If you could please address their requests along with any other requests in other reviews from core developers that would be appreciated.

Once you have made the requested changes, please leave a comment on this pull request containing the phrase I have made the requested changes; please review again. I will then notify any core developers who have left a review that you're ready for them to take another look at this pull request.

And if you don't make the requested changes, you will be poked with soft cushions!

Copy link
Contributor

asvetlov commented May 28, 2019

Sorry, didn't read your last message.

Let's postpone merging for a while.
If #5914 will be merged soon you'll do sync with the master and I'll merge.
Otherwise we have to add tests skipping or expectedFailure() on Windows

def test_create_subprocess_exec_with_path(self):
async def execute():
p = await subprocess.create_subprocess_exec(
pathlib.Path(sys.executable), '-c', 'pass')
Copy link
Member

serhiy-storchaka May 28, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If we test for the support of the path protocol it is better to use test.support.FakePath instead of pathlib.Path.

Copy link
Contributor

asvetlov left a comment

#5914 has been merged.
Please sync with master and address @serhiy-storchaka suggestion about test.support.FakePath.
Rebase is not necessary, git merge master is enough. We squash all commits on merging anyway.

Copy link
Contributor Author

lilydjwg commented May 29, 2019

I have made the requested changes; please review again.

Copy link

bedevere-bot commented May 29, 2019

Thanks for making the requested changes!

@asvetlov: please review the changes made to this pull request.

Copy link
Contributor

asvetlov left a comment

Well done!

asvetlov added the 🤖 automerge PR will be merged once it's been approved and all CI passed label May 29, 2019
miss-islington merged commit 744c08a into python:master May 29, 2019
lilydjwg deleted the asyncio-subprocess-path-args branch May 29, 2019
DinoV pushed a commit to DinoV/cpython that referenced this pull request Jan 14, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🤖 automerge PR will be merged once it's been approved and all CI passed
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants