Skip to content
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 install --selective-upgrade #4351

Closed
saisankargochhayat opened this issue Jun 17, 2020 · 3 comments
Closed

Pipenv install --selective-upgrade #4351

saisankargochhayat opened this issue Jun 17, 2020 · 3 comments

Comments

@saisankargochhayat
Copy link

Issue description

Attempting just to upgrade one package, with out updating other packages.

Steps to replicate

Git clone - https://github.com/saisankargochhayat/pipenvTest
Couple of scenarios I tried out just to update one package requests -

  • pipenv install requests==2.24.0 --keep-outdated
    Just updates the package version, but not the hashes in the Pipfile.lock, pins down in Pipfile
  • pipenv install --selective-upgrade requests==2.24.0
    Just updates the package version, but not the hashes in the Pipfile.lock, pins down in Pipfile
  • pipenv install requests==2.24.0
    Updates both requests and semver to their latest versions and the hashes.
  • pipenv update --selective-upgrade requests
    Updates both requests and semver to their latest versions and the hashes.

Seems like pipenv install {dependency}=={package_version} --keep-outdated earlier did the trick, but now it works, but just misses out on the new hash. Is there a new way to achieve this?


Pipenv support output - https://gist.github.com/saisankargochhayat/a7d09bdc1cea8eeadf902a1bae503b1d

@saisankargochhayat
Copy link
Author

pipenv install requests==2.24.0 --keep-outdated still doesn't seem to be working with Pipenv 2020.8.13 😞
image

@danstewart
Copy link

danstewart commented Jan 13, 2023

I have been having this issue and have found a workaround.

# Install the package
# This will update the version number in Pipfile and the Pipfile.lock - but not the package hashes
# I'm not sure if --keep-outdated does anything here, I get the same results without it but I include it to be safe
pipenv install --keep-outdated --selective-upgrade package==0.0.1

# This will update the hashes for the modified package only
pipenv lock --keep-outdated

The only downside is that it seems to add the new hashes and keeps the old ones, but that doesn't seem too big of a deal to me.


This comment clarifies some things:
#3461 (comment)

@matteius
Copy link
Member

--keep-outdated and likely --selective-upgrade are deprecated/slated for removal. I've been working on an alternative command that solves the kind of problems these other flags caused. Checkout out: #5617

@matteius matteius closed this as completed Mar 4, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants