-
Notifications
You must be signed in to change notification settings - Fork 3.1k
Implement a "pip upgrade" command #3194
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
Upgrade those requirements given directly but dependencies only as needed to satisfy dependency relations. Inspired by Nathaniel Smith's post at http://thread.gmane.org/gmane.comp.python.scientific.user/36377 See also: pypa#59
You might want to deprecate the |
We'll want to deprecate |
It seems that |
@dstufft: I'm dubious about this And of course |
let's say I'm using the upgrading P.S.: just want to state clearly that P.S.: the lack of proper resolution (#988) does make recursive upgrades more dangerous than they should be, but it's not the fault of the "recursion" itself, but rather that pip does not properly consider the constraints of the existing environment, and also does not properly compile constraints as it discovers them in the resolution process. |
Thanks for working on this @jkseppan! There's some text in |
In what circumstance would I specifically want to get all bug fixes in whatever packages happen to be in pyramid's dependency chain, but avoid getting bug fixes in other packages? To be clear, I'm assuming we will eventually have an (AFAICT the only reason |
why would someone look at |
Ahh, maybe this is the confusion, because this case was so obvious to me that I didn't think it needed explaining :-). (Which either means that I have some relevant insight, or some special misconception ;-).) The use case for I mean, if you want to support |
I understand the case of wanting a specific fix : ) But I also think people think in terms of "let me get the latest fixes" generally for some library (and it's dependencies). if we already had a safe "upgrade-all", then I'd be more inclined to forget about it. I guess this is a case, where I'll go along with the majority opinion, because I can't claim to know the mind of "most people" that I'm trying to represent here. |
I guess my suggestion would be to deprecate -U/--upgrade without On Mon, Oct 19, 2015 at 5:51 PM, Marcus Smith [email protected]
Nathaniel J. Smith -- http://vorpus.org |
As an tangent. I'm a fan of upgrade -all instead of upgrade-all Sent from my iPhone
|
name = 'install' | ||
summary = 'Install packages.' | ||
upgrade_option = True | ||
upgrade_direct = False |
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 may be bikeshedding, but this "upgrade_direct" phrase is pretty meaningless to me.
I'd prefer "upgrade_recursive", which will be True for the InstallCommand, and False for the UpgradeCommand
Just 2¢, but the |
it will, if flask has updated the lower bound for one of it's dependencies. for example, currently, it requires |
Ah, ok, but it won't get available but not required updates, unless I manually specify all the dependencies? |
That is correct. The default of In any case though, the end goal should be that we never violate version constraints (at least without some sort of flag to force it). |
I still think for cases like frameworks this is valuable, and I still think the Flask example stands: |
@jsocol understood. your voice on this is exactly what I was trying to represent in a comment earlier #3194 (comment) |
@qwcode I thought that's what part of your comment was, just providing a +1 and concrete example! 👍 |
I typically don't have complex enough dependencies for it to matter much to me one way or another, but I also see the benefit of this behaviour. (It's what I'd intend when thinking something like "upgrade the flask-related stuff for my project"). |
Let me see if I understand the points presented in the discussion correctly. People have use cases for:
There has been a suggestion to deprecate Here's one thing that is unclear to me: |
upgrade_recursive should be more obvious than upgrade_direct
Use upgrade and upgrade_recursive instead of upgrade (recursive) and upgrade_direct (only this package).
IMO, yes
I'll respond later... I need to look closer at the state of
|
I don't think so. The overwrite is how the upgrade is actually performed currently for |
summary = 'Install packages.' | ||
upgrade_command = False | ||
upgrade_option = True | ||
upgrade_is_recursive = True |
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.
you've got an inconsistency here. InstallCommand
has upgrade_is_recursive
, whereas UpgradeCommand
has upgrade_recursive
.
I'd prefer the shorter upgrade_recursive
I'm trying to think why we wouldn't just let pip upgrade install things too. Is there any reason that wouldn't work? Sent from my iPhone
|
I think #3194 (comment) is the objection: it could be surprising if |
hmm, I'm not sure if it's really that surprising, and I really hate the idea of an |
I think I tend to agree. At least if I type |
I can't think of a convincing use case either, if one emerges we can cross that bridge when we come to it. I'd much rather have the "user typing at the console" case require as few flags as possible and the "script invokes a thing" case require flags, when they need different behavior. |
Yeah, the only reason not to have upgrade install by default is the |
Well one reason is that |
Well, here's a question: how bad would it be to transition 'pip install' so
|
This has been discussed in gh-59 and elsewhere I think. The "only if needed behavior" needs to be the default behavior for the command that does upgrading, and the pip devs don't want to change the default of |
So here's another possible option: We don't add
The exact spelling of these could be different, like we could do The "default" (only) option right now is the recursive upgrade, this is unacceptable to many projects and I understand why that's a problem. I think that if we don't find the idea of a new command palatable and we'd prefer to continue to just have the install command, then we're going to have to default to a safer option for We wouldn't need to implement the I will admit that I find the idea of having Maybe the answer is to just change the default behavior of Anyways, I think it's really just about deciding which option is the least worst for us because the current situation isn't particularly great and I don't think there's a perfect option for us here. |
I guess the tl;dr is that I totally think that we need to fix the "default" behavior, we just need to settle on the specific implementation of fixing it:
@pypa/pip-developers Thoughts ^^? |
I think this is 100% the best solution if we can get there. It's not confusing -- in fact it's arguably even simpler to explain than the current behavior (" (We'd also want to add some option to restore the current behavior for the rare case where you really do want to say "I need some version of foo but I don't care what", like |
Moving the discussion about what the exact UI should be over to #59 instead of having dueling comment threads. |
Accidentally closed this, reopening. Sorry! |
Hello! As part of an effort to ease the contribution process and adopt a more standard workflow pip has switched to doing development on the If you do nothing, this Pull Request will be automatically closed by @BrownTruck since it cannot be merged. If this pull request is still valid, please rebase it against If you choose to rebase/merge and resubmit this Pull Request, here is an example message that you can copy and paste:
|
This Pull Request was closed because it cannot be automatically reparented to the Please feel free to re-open it or re-submit it if it is still valid and you have rebased it onto |
Upgrade those requirements given directly but dependencies only as needed to satisfy dependency relations. Inspired by Nathaniel Smith's post at http://thread.gmane.org/gmane.comp.python.scientific.user/36377.
See also: #59