-
-
Notifications
You must be signed in to change notification settings - Fork 32.5k
bpo-31351: Fix RC 0 in ensurepip when pip fails #3626
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
Conversation
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). Unfortunately our records indicate you have not signed the 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. Thanks again to your contribution and we look forward to looking at it! |
371746c
to
65f26a1
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks good to me. Just one additional change needed, which is to mention the command line return value with a corresponding .. versionchanged: 3.7.0
note in https://docs.python.org/3/library/ensurepip.html#command-line-interface
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 |
As far as the return value of |
I didn't expect the Spanish Inquisition! |
Nobody expects the Spanish Inquisition! @ncoghlan: please review the changes made to this pull request. |
Thanks @iafilatov for the PR, and @ncoghlan for merging it 🌮🎉.. I'm working now to backport this PR to: 2.7, 3.6. |
GH-3683 is a backport of this pull request to the 3.6 branch. |
Thanks @iafilatov for the PR, and @ncoghlan for merging it 🌮🎉.. I'm working now to backport this PR to: 2.7. |
Sorry, @iafilatov and @ncoghlan, I could not cleanly backport this to |
GH-3734 is a backport of this pull request to the 2.7 branch. |
ensurepip discards pip's return code which leads to broken venvs. Make sure EC is propagated to that scripts that run ensurepip in a separate process (e.g.
python -m ensurepip
) can detect failure.I decided to keep the return value of the public version of
bootstrap()
unmodified although I'm not sure it's correct because it leaves no way to check if pip has succeeded or not (and I doubt there's a lot of code that relies onbootstrap()
returningNone
).https://bugs.python.org/issue31351