pypa/pip

Constraints override pinned requifrements

Closed this issue · 2 comments

Environment

  • pip version: 19.1.1
  • Python version: PyPy 7.0.0
  • OS: OS X

Description and How to Reproduce
constraints. txt:
urllib3>1.23

requirements.txt:
urllib3==1.24.3

When I run:
pip install -c constraints.txt -r requirements.txt

It installs:
Successfully installed urllib3-1.25.2

This means that the pinned requirement urllib3==1.24.3 is ignored and is not what is expected.

Expected behavior
Should install urllib3==1.24.3 not 1.25.2.

I'd say this is an other duplicate of #988.

Agreed. The current behavior is indicated in the docs, that is, pip will use the first requirement (or constraint) found of those provided. Once #988 is fixed then this will not be an issue since we would choose the narrower version constraint (urllib3==1.24.3).