Pip complains about inexact pinning with --require-hashes, but all versions are pinned with == #9810
Closed
1 task done
Labels
resolution: duplicate
Duplicate of an existing issue/PR
Description
Hey, I'm running into a confusing behavior with pip, and I'm not sure whether it's a bug or if I'm doing something wrong. I made a simple case to reproduce the problem: I have a requirements.in file that includes botocore and urllib3[secure], and I'm compiling a lockfile at requirements.txt with pip-compile --generate-hashes. When I install from requirements.txt using --extra-index url, I get an error:
Every library in requirements.txt is pinned with "==". Also, I don't get an error if I don't use the private registry, or if I do use the private registry but drop "[secure]" from urllib3 in the lockfile. As far as I can tell, the wheels I'm downloading from the private registry and the usual pypi are identical. Any ideas about what's going on?
Expected behavior
Pip shouldn't fail on inexact pinning when all dependency versions are pinned with ==.
pip version
21.0.1
Python version
3.7.10
OS
macos
How to Reproduce
This is going to be hard to reproduce because the pypi index in question is private, but here goes:
botocore
andurllib3[secure]
torequirements.in
pip-compile --generate-hashes
pip install -r requirements.txt
--extra-index-url REDACTEDOutput
Code of Conduct
The text was updated successfully, but these errors were encountered: