-
-
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
pipenv lock --keep-outdated updates subdependencies #3975
Comments
I can confirm the same behavior. Tested a couple of scenarios
$ pipenv --supportPipenv version: Pipenv location: Python location: Python installations found:
PEP 508 Information:
The OS is actually |
Can confirm this as well. It is super undesired. I think the key issue occurs when application/default packages share sub-dependencies with dev/develop packages. The only WORKAROUND I found was to manually revert the "default" JSON section (short of figuring out some complex bash/git-patch script). |
@frostming Could this get some attention? |
The problem makes sense, the goal of the |
The goal of The workflow that is still challenging is going from a Pipfile with semver ranges to a Pipfile.lock that pins the particular versions installed now, and it should be possible to selectively upgrade some dependencies and transitive dependencies and to cement those changes in the lock file without having other things updated unexpectedly. |
Repeating the exact same steps on 2020.11.15, the issue has gone. I am going to close this one, other comments are different issues, please track in #4539 . Thanks |
Exactly my point, this feature requested is something that, if it updates the lockfile, is meaningless. The goal of the lock command is to resolve versions, this feature request is to never ever try to resolve versions but instead use the lockfile with all the versions already resolved. |
I think this is the point of disagreement. The only time I expect it to resolve a version is when there is no existing lock file or the existing lock file entry does not satisfy an updated entry in the Pipfile. The request for this issue was to make it possible to make the minimal updates to satisfy the Pipfile, while keeping everything that already does satisfy unchanged. |
uhhhh preconditions
priming initial conditions
then conduct the test, REMOVE six==1.5 from
|
@mcallaghan-bsm Your initial command is to install 3.7, but your trace is using 3.6. I think PEBKAC in this case. |
(kk abandoning issue closed NWA) |
FWIW new versions of pipenv have a requirements command to generate the requirements.txt and this will likely eventually completely replace the pipenv lock -r behavior or at least that could lock and then run the requirements command, but the requirements command simply introspects the Pipfile.lock. Including hashes is one of the flags available for the new command. |
Issue description
pipenv lock --keep-outdated
updates versions of subdependencies despite the--keep-outdated
flag.Example: Pipfile contains
python-dateutils
which hassix
as a dependency. If a newer version ofsix
is available it will be put into Pipfile.lock bypipenv lock --keep-outdated
.Expected result
When used with
--keep-outdated
, pipenv lock uses the currently installed versions without doing any updates.Actual result
Pipenv lock puts newer versions of subdependencies into Pipfile.lock.
Steps to replicate
six = '==1.12'
.This issue seems to apply only to subdependencsies: If you specify "*" for python-dateutil in the Pipfile,
pipenv lock --keep-outdated
will (correctly) refrain from updatingpython-dateutil
.$ pipenv --support
Pipenv version:
'2018.11.15.dev0'
Pipenv location:
'/usr/lib/python3.7/site-packages/pipenv'
Python location:
'/usr/bin/python'
Python installations found:
3.7.4
:/usr/bin/python3
3.7.4
:/usr/bin/python3.7m
PEP 508 Information:
System environment variables:
Pipenv–specific environment variables:
Debug–specific environment variables:
Contents of
Pipfile
('/home/martin/temp/piptest/Pipfile'):Contents of
Pipfile.lock
('/home/martin/temp/piptest/Pipfile.lock'):The text was updated successfully, but these errors were encountered: