-
-
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
Improve pipenv update and add pipenv upgrade command #5617
Conversation
…items not being written to the Pipfile.
Example -- my project
Now if I reset that, and say I just want to upgrade
|
This looks great. The way we currently use We then regularly use We have some internal packages which we often want to update without updating anything else, to do that we use the following commands:
If I understand correctly, with this change we can replace these commands with |
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.
Thanks for your work on pipenv! I spotted an improvement opportunity while checking a link to this PR from #5618.
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.
As mentioned by @kurtmckee as he has spotted changes to pipenv/cli/options.py in lines 187 and 188, I also suggested additional changes to 160 and 161, as in #5618 it was mentioned but overseen to change
@matteius can you please fix the conflicts? |
My plan for the documentation is we have a news fragment in this PR, and I've begun working on some larger effort to revamp the documentation, the first iteration which breaks apart the basics section and includes some more details on this work is here: #5621 |
Up until now, there was not a reasonable way to generate a lockfile for a subset of dependencies, which is important for users in monolith systems.
The issue
Fixes #5613
Need to be able to eliminate
--keep-outdated
and provide an option that is rational for upgrading only packages and their dependencies. This should also allow elimination of--selective-upgrade
, both of which are largely broken for different reasons.This also fixes a bug when adding packages to categories in the
project.py
as a side-effect of these changes.Adding an
upgrade
command will be useful for dependabot, which will want to adjust lockfiles and/or Pipfiles without invoking an install phase.The fix
This command is minimalist, it will adjust the
Pipfile
andPipfile.lock
but it will not install the dependencies. This will be useful for helping depandabot support newer versions of pipenv as well.Additionally, review the
pipenv update
command and use the same logic forpipenv update packageA
thatpipenv upgrade
uses, with the benefit being that it will install the dependency updates at the end. This will be useful for users that want to run fewer commands, and I believe addresses some issue reports with thepipenv update
command.Users can still invoke a complete re-lock based on the
Pipfile
specifiers by runningpipenv lock
.The checklist
news/
directory to describe this fix with the extension.bugfix.rst
,.feature.rst
,.behavior.rst
,.doc.rst
..vendor.rst
. or.trivial.rst
(this will appear in the release changelog). Use semantic line breaks and name the file after the issue number or the PR #.