Skip to content
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-38662: Invoke pip via runpy, in ensurepip #17029

Closed
wants to merge 1 commit into from

Conversation

pradyunsg
Copy link
Member

@pradyunsg pradyunsg commented Nov 1, 2019

@pradyunsg
Copy link
Member Author

Should this get a skip-news label?

finally:
sys.argv[:] = backup_argv

assert 0, "should never reach here"
Copy link
Contributor

Choose a reason for hiding this comment

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

Why don't just write a return o raise an exception instead of the message "Should never reach here"?

Copy link
Member Author

Choose a reason for hiding this comment

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

Well, they'd be functionally the same as far as I'm concerned. This is just a sanity-check, so I'm using an assert.

Anyway, if this is the problem with this PR, I'll be happy to change it.

Copy link
Contributor

Choose a reason for hiding this comment

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

"raise SystemError" complaining that pip didn't exit as expected would be the way to go here.

Copy link
Contributor

@ncoghlan ncoghlan left a comment

Choose a reason for hiding this comment

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

I was skeptical, but the draft PR has convinced me that this is a good idea.

Changes needed are the discussed SystemError, and adding a news entry with blurb.

@bedevere-bot
Copy link

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 put in the comfy chair!

@csabella
Copy link
Contributor

@pradyunsg, please address the review comments. Thanks!

@hroncok
Copy link
Contributor

hroncok commented Mar 10, 2020

I will submit a new PR with the requested changes. We agreed on this with @pradyunsg on IRC.

@hroncok
Copy link
Contributor

hroncok commented Mar 10, 2020

In here: #18901

@pradyunsg
Copy link
Member Author

Closing in favor of #18901

@pradyunsg pradyunsg closed this Mar 10, 2020
@pradyunsg pradyunsg deleted the use-runpy-in-ensurepip branch March 10, 2020 20:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
awaiting changes type-bug An unexpected behavior, bug, or error
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

8 participants