-
Notifications
You must be signed in to change notification settings - Fork 2
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
Feedback on warn-before-installation #1
Comments
Is e81b602 really disallowing non-wheel build dependencies? If so, that doesn't sound quite right - build dependencies with compiled extensions (e.g. numpy is a common build dependency due to its C API) will likely fail on non-standard platforms. |
For who is looking for a diff: the "Files changed" tab of pypa/pip@master...pradyunsg:resolver/warn-after-resolution |
Can't try it out right now, but from reading the code things look good to me overall. One thing I'm not sure the |
Hmm... I think a better place to discuss this is pypa#4802?
I could but I'm not sure how that would work. Mostly, I don't see too many people using |
Yeah, not many people use |
Indeed, thanks. I have a bad memory it seems:( |
Hmm... The initial thought was that it might not be able to identify the right conflicts due to the missing extras information and I was concerned if it's too noisy in some cases. I didn't actually give it a second thought and I guess it'll only miss out on conflicts, not introduce new ones. The noise part is something I'd like to hear about here. Happy to reduce the number of knobs. =) |
Not sure if my question fits this topic, but will post it here: |
Oops! I thought I'd responded @MarSoft. Sorry! So, the issue you're pointing out, needs the proper resolver to be brought in to fix. This branch does not in fact change any code in the dependency resolution code in pip -- that's what I'll change next. :) |
/ping @pfmoore @xavfernandez @dstufft |
Not sure what feedback you want from me? I haven't tried out the branch, and I don't see any description of what it does compared to pip master. The phrase "warn before installation" doesn't really give me any feel for what it's doing. |
I'd like to know if you think this change is a useful one.
a picture is worth a thousand words Essentially, this branch adds code to print that line in red. Basically, a warning whenever pip selects an incorrect set of packages for some reason, printed before the actual installation code is run. |
But there's no "Are you sure?" prompt? I guess I don't see how printing that information can be bad, but by the time the user sees it there's nothing much they can do about it. And I doubt we can reasonably offer any advice in the message as to how to fix any damage... So I don't see any harm in it, but doubt it'll actually help much in practice, either. |
Probably we could show message and then delay further operations for e.g. 5
seconds, to give the user possibility to cancel.
пт, 16 февр. 2018 г., 17:11 Paul Moore <[email protected]>:
… But there's no "Are you sure?" prompt? I guess I don't see how printing
that information can be bad, but by the time the user sees it there's
nothing much they can do about it. And I doubt we can reasonably offer any
advice in the message as to how to fix any damage...
So I don't see any harm in it, but doubt it'll actually help much in
practice, either.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#1 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/AAKc6xbBsadzrD2F_wnHJckObSKnENfIks5tVYyfgaJpZM4Ruj7O>
.
|
I'm not too keen on that - a delay won't help people who start a long-ish install and then work on something else, and it will frustrate people who do want to continue. OTOH, an "Are you sure?" prompt will potentially cause issues with unattended installs such as CI (we've had this issue with people who prompt in setup.py`). UI design is hard :-( On reflection, are we sure that the benefit of getting such a message is worth it? Is this something that "having a proper resolver" would fix? It's "a warning whenever pip selects an incorrect set of packages for some reason" - isn't the ultimate goal for pip to not select an incorrect set of packages? The message doesn't even suggest what the user can do to fix the issue... |
I guess I won't mind adding a (short 2s-3s) delay if others are fine with doing that.
As I see it, currently pip just breaks the dependency requirements without any sign that it has done so - leading to those hard to debug issues. I see this as an improvement in that regard, at least now pip's telling you it broke stuff when it does it. Functionally, this is running pip check on what packages would look like after installation but before actually installing them. Running pip check after installations, is not something that I've not seen too many people doing today.
Agreed. The "fix" is to do another pip --upgrade run, additionally specifying the constraints that were broken and the top-level package which may again print some more constraints which means another run -- it's not really very nice or clean.
+1
Yes it is. The motivation behind this is that if we end up doing a pip release before I find the time to bring in zazo to pip, this is an low-effort, okay, short-term-only improvement over the status quo. :)
Another one of those unreleased fixes. :( PS: This is why I wanted your feedback. ^>^ |
I don't really want to add a delay - "quick, hit Ctrl-C if you don't like what I just said" is a really bad UI, IMO. And interactive prompts are problematic for scripted situations (that can be worked around with
Agreed. You've convinced me this is worth it.
Glad I'm helping :-) |
Oh, and, I didn't mention -- I added an option to allow the user to silence these errors from being printed. |
I think pypa#5000 is ready to go. Any other concerns or feedback on the functionality? |
No, I'm OK with the idea. I won't have time to review that PR, I'm afraid, so I'll leave it to you to decide if you want to merge it. I'm fine with the functionality going into pip 10, though. (One minor thing I want to confirm - you didn't say so explicitly but from a quick scan of the code I guess you didn't add a delay or prompt - which is good, I would not want this to go into pip 10 with a delay/prompt, that decision would need some more time for review). |
There's no prompt. There's a new option |
Cool, that's what I understood. So yeah, I'm fine with this. |
Closing this -- this feature/behavior has released as a part of pip 10. :) |
This issue is for collecting feedback on the warn before installation (i.e. warn after resolution) behaviour currently implemented in
resolver/warn-after-resolution
branch on this repository.One known limitation of it is that it can't currently deal with extras since information about installed extras is not stored in the installation metadata. [1] That's something for later though, Sorry! :)
Open Questions:
--no-warn-conflicts
good enough here?To checkout this branch, I suggest you create a virtualenv (you use virtualenv or venv right?) and use the following to install this branch:
The text was updated successfully, but these errors were encountered: