Deprecate --keep-outdated flag. #5544
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The issue
This flag, which was never fully explained in the documentation, leads to a source of a lot of confusion and issue because the underlying concept is flawed. It cannot be used until a consistent lock file is generated with
pipenv lock
orpipenv install
and then when applied it will bring in any new package from a new consistent lock phase which is not already defined in thePipfile.lock
thus often creating inconsistent and unexpected locks.The fix
This was always a workaround to avoid managing the Pipfile specifiers and packages listed/pinned in the Pipfile, which is the inputs into the resolver for the new lock phase whenever modifying package requirements. Instead, users that do not want packages updated while upgrading other packages should be pinning those in the Pipfile so they can be used as proper inputs to the pip resolver.
How does this pull request fix your problem? Did you consider any alternatives? Why is this the best solution, in your opinion?
I have considered for a year now how to make
--keep-outdated
better, but the reality is it was a flawed idea that existed before the switch to using the pip resolver, and it no longer makes sense to keep around because it leads to confusion and support tickets that shouldn't exist.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 #.