Pip does not update too-old dependencies when installing multiple packages #7135
Labels
auto-locked
Outdated issues that have been locked by automation
C: dependency resolution
About choosing which dependencies to install
type: bug
A confirmed bug or unintended behavior
Description
I'll discuss specific packages, since this has been observed in the wild (HypothesisWorks/hypothesis#2113): we recently updated our
install_requires
dependency onattrs>=16.0
toattrs>=19.2
, on the basis that installing the latest version of Hypothesis would update users' attrs too.pip install hypothesis
does indeed work.pip install pytest hypothesis
works iff an older version of attrs is not already installed.It looks like, when multiple packages are listed in an install command, the compatibility of already-installed dependencies are only evaluated for the first package listed and for later packages the presence but not version of dependencies is checked. This also affects the use of requirements files.
Expected behavior
Regardless of other packages listed to install or already present,
pip install hypothesis
should either result in a compatible set of packages installed or an error message - not a broken environment.How to Reproduce
Then run
tox --recreate
to, well, recreate the virtual environment and run the commands.(And thanks to everyone working on
pip
, it's very valuable and much appreciated 😍)The text was updated successfully, but these errors were encountered: