-
Notifications
You must be signed in to change notification settings - Fork 3k
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
Add pip.main
as func raising clean error
#5254
Conversation
This has upsides and downsides. It improves the errors and guidance for those who invoke `pip.main`, but it changes the time of failure for some modules attempting to import and use `pip.main`. Instead of failing at import time, they'll fail when they invoke `pip.main()`. On the plus side, it means that modules which import pip.main but only use it in some of their functions/classes may remain otherwise functional, so the scope of breakage is reduced. Modules using `pip.main()` are going to be broken one way or another, and although ImportErrors will be superior for a number of users, it forbids us from sending good and clear messaging about what to do to remediate. Advertising pip<10 as "maybe working" is probably a bit controversial, but it's practical/useful info. Whether or not pip takes a hardline stance on this is a matter for discussion/debate.
I remain -1 on this. There's no evidence that it'll result in any change in user behaviour - the people encountering this error are typically doing things like |
The ImportError they'll see without this doesn't help those users either. This helps package maintainers who have been calling |
Well, they could always read the release notes, and the docs, and the various release emails and announcements, and look at the issue tracker for discussions of similar issues... |
Yes, the information is already out there. Why does that make it bad to present it in a more cogent and direct manner? |
I didn't say it was bad, just that I'm against doing it. I don't think there's any real benefit, and it's something we'd have to maintain and potentially debate (I already object to the "you may find |
Something is better than nothing if it can be done without making things worse.
If you're on a distro that doesn't support pip10 yet, and you shrugs I don't have a super-strong commitment to this. I just think having a clear message will save less clue-ful users a lot of headache. |
|
Hello! I am an automated bot and I have noticed that this pull request is not currently able to be merged. If you are able to either merge the |
I agree with @pfmoore here. I'm also not in favor of this. Anyways, the ship has sailed on this. I don't see users being helped by this change because nearly all of the reported issues are due to users messing up their OS package manager-managed pip installations. |
The underlying issue here IMO was pip's upgrade being done incorrectly, partly due to pip printing a bad message for users to do the upgrade. We're working on that in #5346. |
Closing since I don't see anything actionable on this PR anymore. Feel free to comment here if I'm wrong on that. :) |
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
This is follow-up/an alternative to #5149
This has upsides and downsides. It improves the errors and guidance for those who invoke
pip.main
, but it changes the time of failure for some modules attempting to import and usepip.main
. Instead of failing at import time, they'll fail when they invokepip.main()
.On the plus side, it means that modules which import pip.main but only use it in some of their functions/classes may remain otherwise functional, so the scope of breakage is reduced.
Modules using
pip.main()
are going to be broken one way or another, and although ImportErrors will be superior for a number of users, it forbids us from sending good and clear messaging about what to do to remediate.Advertising pip<10 as "maybe working" is probably a bit controversial, but it's practical/useful info. Whether or not pip takes a hardline stance on this is a matter for discussion/debate.