Closed simahawk closed 3 years ago
Does this cause issues in practice ?
The final result seems correct anyway but in the case of lower pinning you get 2 downloads. Eg:
$ cat test-bad-requirements.txt
apispec
apispec<5.1.0
$ pip install -r test-bad-requirements.txt --no-cache-dir
Collecting apispec
Downloading apispec-5.1.0-py2.py3-none-any.whl (28 kB)
Downloading apispec-5.0.0-py2.py3-none-any.whl (28 kB)
Installing collected packages: apispec
Successfully installed apispec-5.0.0
Greater pinning (same case as base_rest):
$ cat test-bad-requirements.txt
apispec
apispec>=4.0.0
$ pip install -r test-bad-requirements.txt --no-cache-dir
Collecting apispec
Downloading apispec-5.1.0-py2.py3-none-any.whl (28 kB)
Installing collected packages: apispec
Successfully installed apispec-5.1.0
So, not really harmful, but still weird and sub-optimal if we have many duplicated entries. In fact, this does not happen that often...
Yep, the pip resolver is correctly handling these cases. This would be hard to "fix" for little benefit. Moreover when mixing requirements.txt
from different repos people still need to rely on pip to resolve correctly. So closing.
Specific version pinned https://github.com/OCA/rest-framework/blob/14.0/base_rest/__manifest__.py#L27 leads to duplicated entries into requirements.txt:
Example: https://github.com/OCA/rest-framework/runs/3652923710#step:4:164
CC @lmignon