-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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 a pip-style --upgrade-strategy
setting to pipenv lock
?
#418
Comments
Thanks for bringing this to our attention, @ncoghlan! Do you know offhand what version of Our recent hiccup in Requests (psf/requests#4006) has me a bit paranoid about features that didn't exist back to pip 6.X, if not earlier. There are still at least 1.5 million people/instances using the 1.5.X series of @kennethreitz, do you have any thoughts on supporting this. I do think we should maintain |
@nateprewitt It doesn't currently seem to be mentioned in the release notes [1], but pypa/pip#3972 is the PR that added it. That means it would have first appeared in pip 9.0.0 in November 2016. [1] I submitted an issue regarding that oversight: pypa/pip#4568 |
As far as the version compatibility question goes, I think it would be reasonable to have using However, I also think you're right that the more important point here is to have pipenv pass |
Adding @dstufft to the discussions, as he mentioned hoping to deprecate and remove the |
This causes a problem for me. My
But when I run So, since the |
I definitely want to avoid adding options if at all possible, and your statement of "This is actually fine for my own current use cases" is a telling one, in this instance :) |
I'm going to close this one, as I think the However, the change in pip's default upgrade strategy still needs to be accounted for at the pipenv level, so I filed #438 to cover that. |
I'd like to push back here. The whole point of the lockfile is to pin dependencies to a known working version - to not have to assume that "most of my dependencies are stable enough"; to make all upgrades explicit (which, of course, is better than implicit). I started this line of conversation in #966, but maybe this (or another issue) is a better place for it. Having |
I agree with @brettdh. With pip, I used a constraints file to make very sure that versions don’t change, and I actually get deterministic builds. I hoped that the lock file would achieve the same purpose, but whenever I try to add a dependency (even one with no dependencies itself), Pipenv upgrades a number of unrelated packages and rewrites the lock file that I hoped would keep them at their exact version. Even if I do To get deterministic builds, Pipenv should add to the lock file but never change something that is already in it. @ncoghlan: I’d like to drop down to this lower level now to make sure that my builds are really deterministic. What were you thinking of there? I tried out controlling pip’s behaviour with environment variables, but it didn’t work for me. |
@Telofy For the first project where I experimented with As far as version pinning goes, that works the same way as I'm not aware of any current Python dependency pinning tools that offer a |
@ncoghlan Thanks! In all my projects save for the one where I’m experimenting with Pipenv, I pipe all of
If there are conflicts, I need to resolve them manually, but at least I can be sure that no transitive dependencies upgrade to versions that are subtly incompatible with dependencies of mine that I’d much rather use as black boxes. What is tricky, is upgrading an existing dependency that has dependencies of its own without accidentally changing the versions of unrelated packages. I hoped Pipenv could do that. It’s just imperative that nothing changes implicitly about any of the direct and transitive dependencies no matter whether the build is executed today or in a year. |
I agree with what @Telofy said. Deterministic builds would be really helpful and I actually thought Let's say I write a Django app and use In that case: what are my options? Pin down dependencies in So far I've been using |
pip install
these days offers an--upgrade-strategy
option to let users choose between "only-if-needed" upgrades (which upgrades components only if needed to satisfy new dependencies) and "eager" upgrades, which upgrades everything which has a newer version available that still meets the dependency constraints.In pip 10, the default strategy is changing from
eager
toonly-if-needed
: pypa/pip#4500pipenv lock
currently follows the originalpip install --upgrade
policy of "upgrade everything".This is actually fine for my own current use cases - most of my dependencies are stable enough that the combination of loose dependencies in
Pipfile
and eager upgrades inpipenv lock
works well. I also think this remains the right default behaviour forpipenv
.However, I'm wondering if permitting
pipenv lock --upgrade-strategy=only-if-needed
may makepipenv
applicable to more use cases.The text was updated successfully, but these errors were encountered: