Open rosen-dash opened 2 days ago
Same happens if specifying a constraint file inside requirements.in, such as -c requirements.txt
. However if the constraint file is set via command-line argument instead, like pip-compile -c requirements.txt
then the annotation uses the relative path instead.
Can replicate with pip 24.3 too, suspect this is a consequence of this change? https://github.com/pypa/pip/pull/12877/files#diff-e9f0a8e3da86978e2042a5a8073078ae9e37ee041dbc943c066e0c622c52d0d4
like @jmac105 said I can confirm this is caused by pip 24.3.1. if I use a bit older pip version like 23.0.1 then pip-compile shows relative path.
FWIW this is not an issue in my feature/relpaths-post-6.8.0 branch, but there are no plans to integrate those changes here.
Alternatively, it's not a problem with uv pip compile
, either.
Originally reported here - https://github.com/pypa/pip/issues/13055
Environment Versions
$ python -V
Python 3.9.6$ pip --version
pip 24.3.1$ pip-compile --version
7.4.1Steps to replicate
Sample repo in referred issue.
With pip 24.2
With pip 24.3.1
Expected result
The relative references should be preserved
Actual result
Relative paths get replaced with absolute paths