-
Notifications
You must be signed in to change notification settings - Fork 3k
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
Package left un-upgraded with pip install --upgrade
#10613
Comments
That said, looking at the report more closely, we're preferring the installed version of a package if it's specified with an extra, as a dependency of another package -- even when that dependency is explicitly specified on the CLI. That's... suboptimal. Does |
Yeah it seems like we need the pip/src/pip/_internal/resolution/resolvelib/provider.py Lines 174 to 189 in b160e83
It's quite interesting this bug took so long to surface. |
@pradyunsg, I can confirm that your workaround ( @uranusjr, thanks for creating a fix! I can confirm your PR also solves the problem for me. |
Description
When upgrading both
datasets
andfsspec
in an environment, onlydatasets
was upgraded to the latest version even though there was nothing constrainingfsspec
from being updated.fsspec
is a dependency ofdatasets
(fsspec[http]>=2021.05.0
is specified in itssetup.py
), and from looking at the resolver's debug output, it seems that pip is preferring to use the pre-installed version offsspec
instead of the newer one.The documentation for
--upgrade
says, "Upgrade all specified packages to the newest available version." Unless I'm misunderstanding, all packages explicitly listed on the command line should have been updated if possible.Expected behavior
fsspec
should be upgraded to2021.10.1
.pip version
21.3.1
Python version
3.7.12
OS
macOS 10.15.7
How to Reproduce
pip_fsspec_test.sh
with the following contents:bash pip_fsspec_test.sh &> pip_fsspec_log.txt
in a new environment to create pip_fsspec_log.txt.PIP_RESOLVER_DEBUG=1 pip -vvv install -U 'datasets<=1.14.0' 'fsspec<=2021.10.1'
.bash pip_fsspec_test.sh &> pip_fsspec_verbose_log.txt
in a new environment to create pip_fsspec_verbose_log.txt.Output
See files under "How to Reproduce".
Code of Conduct
The text was updated successfully, but these errors were encountered: