-
-
Notifications
You must be signed in to change notification settings - Fork 619
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Files included relatively in requirements.in file gets converted to absolute paths #2131
Comments
Same happens if specifying a constraint file inside requirements.in, such as 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 |
If the --constraints path is included in a requirements.*.in file, the absolute path is shown in the comments in the requirements.*.txt output. This appears to be related to a pip upgrade. Specifying the --constraints path as a command line arg instead results in the expected relative paths. We can likely change back when this issue is addressed: jazzband/pip-tools#2131
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. |
Relates: #1950 (comment) Relates: jazzband/pip-tools#2131 (cherry picked from commit ef750f6)
Relates: #1950 (comment) Relates: jazzband/pip-tools#2131 (cherry picked from commit ef750f6)
Relates: #1950 (comment) Relates: jazzband/pip-tools#2131 (cherry picked from commit ef750f6)
Relates: #1950 (comment) Relates: jazzband/pip-tools#2131 (cherry picked from commit ef750f6) Co-authored-by: Maxwell G <maxwell@gtmx.me>
Relates: #1950 (comment) Relates: jazzband/pip-tools#2131 (cherry picked from commit ef750f6) Co-authored-by: Maxwell G <maxwell@gtmx.me>
Relates: #1950 (comment) Relates: jazzband/pip-tools#2131 (cherry picked from commit ef750f6) Co-authored-by: Maxwell G <maxwell@gtmx.me>
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 |
This is due to a bug re-introduced into pip in the last release jazzband/pip-tools#2131
This is due to a bug re-introduced into pip in the last release jazzband/pip-tools#2131
This is due to a bug re-introduced into pip in the last release jazzband/pip-tools#2131
This is due to a bug re-introduced into pip in the last release jazzband/pip-tools#2131
This is due to a bug re-introduced into pip in the last release jazzband/pip-tools#2131
Relates: #1950 (comment) Relates: jazzband/pip-tools#2131 (cherry picked from commit ef750f6)
Relates: #1950 (comment) Relates: jazzband/pip-tools#2131 (cherry picked from commit ef750f6) Co-authored-by: Maxwell G <maxwell@gtmx.me>
* Pin pip to 24.2 due to jazzband/pip-tools#2131 * Update python dependencies using 'tox -e update-requirements' * Remove unused pytest-lazy-fixture package * Bump chisme to 0.4.4 to fix #138 Ref canonical/bundle-kubeflow#1177 Ref canonical/bundle-kubeflow#1185 Fixes #138
* Pin pip to 24.2 due to jazzband/pip-tools#2131 * Update python dependencies using 'tox -e update-requirements' Ref canonical/bundle-kubeflow#1177
* Pin pip to 24.2 due to jazzband/pip-tools#2131 * Update python dependencies using 'tox -e update-requirements' Ref canonical/bundle-kubeflow#1177
* Pin pip to 24.2 due to jazzband/pip-tools#2131 * Update python dependencies using 'tox -e update-requirements' Ref canonical/bundle-kubeflow#1177 Ref canonical/bundle-kubeflow#1185
* Pin pip to 24.2 due to jazzband/pip-tools#2131 * Update python dependencies using 'tox -e update-requirements' Ref canonical/bundle-kubeflow#1177
* Pin pip to 24.2 due to jazzband/pip-tools#2131 * Update python dependencies using 'tox -e update-requirements' * Remove unused pytest-lazy-fixture package Ref canonical/bundle-kubeflow#1177 Ref canonical/bundle-kubeflow#1185
* Pin pip to 24.2 due to jazzband/pip-tools#2131 * Update python dependencies using 'tox -e update-requirements' Ref canonical/bundle-kubeflow#1177
* Pin pip to 24.2 due to jazzband/pip-tools#2131 * Update python dependencies using 'tox -e update-requirements' Ref canonical/bundle-kubeflow#1177
* Pin pip to 24.2 due to jazzband/pip-tools#2131 * Update python dependencies using 'tox -e update-requirements' * Remove mocking of private ops class according to canonical/operator#1369 and canonical/seldon-core-operator#268 * Pin blinker due to seleniumbase/SeleniumBase#2782 Ref canonical/bundle-kubeflow#1177
@macro1 the CI is now green and working on PRs unblocked. |
Workaround for: jazzband/pip-tools#2131
* Pin pip to 24.2 due to jazzband/pip-tools#2131 * Update python dependencies using 'tox -e update-requirements' * Remove unused pytest-lazy-fixture package Ref canonical/bundle-kubeflow#1177 Ref canonical/bundle-kubeflow#1185
@webknjaz is there a consensus for a solution that needs to be worked on? I can definitely help with a PR but I'd need guidance on what needs to be fixed and I'm confused where to look for more infos. Thanks ! |
* Pin pip to 24.2 due to jazzband/pip-tools#2131 * Update python dependencies using 'tox -e update-requirements' Ref canonical/bundle-kubeflow#1177
* Pin pip to 24.2 due to jazzband/pip-tools#2131 * Update python dependencies using 'tox -e update-requirements' Ref canonical/bundle-kubeflow#1177
Note: The absolute paths are due to a bug in pip-compile: jazzband/pip-tools#2131
* Pin pip to 24.2 due to jazzband/pip-tools#2131 * Update python dependencies using 'tox -e update-requirements' * Remove unused `pytest-lazy-fixture` package Ref canonical/bundle-kubeflow#1177 Ref canonical/bundle-kubeflow#1185
* Pin pip to 24.2 due to jazzband/pip-tools#2131 * Update python dependencies using 'tox -e update-requirements' Ref canonical/bundle-kubeflow#1177 Ref canonical/bundle-kubeflow#1185
* Pin pip to 24.2 due to jazzband/pip-tools#2131 * Update python dependencies using 'tox -e update-requirements' * Remove unused pytest-lazy-fixture package * Bump chisme to 0.4.4 to fix #138 Ref canonical/bundle-kubeflow#1177 Ref canonical/bundle-kubeflow#1185 Fixes #138
* Pin pip to 24.2 due to jazzband/pip-tools#2131 * Update python dependencies using 'tox -e update-requirements' Ref canonical/bundle-kubeflow#1177
I'm curious if there's an update on the timeline for addressing this issue, or if there's a recommended workaround in the meantime? |
@johnraz yeah, feel free to send a PR. You'll need to grep the repo for what outputs it and go from there. You'll also need to add tests. |
@tarasinf a workaround could be using older pip or post-processing the output with some wrapper. You can also figure out how to fix it and send a pull request. Timeline: whenever someone sends an acceptable PR, it gets merged and releasing's unblocked. |
Thanks.
For the test purpose, to be sure pre-commit uses a proper pip version, I used this custom check:
and run it by |
@webknjaz hi. what's considered an acceptable PR (in addition to the guidelines[1])? does it just need to 1) fix the issue and 2) have a test that demonstrates the issue has been fixed? [1] https://github.com/jazzband/pip-tools/blob/main/CONTRIBUTING.md |
FWIW I've just merged latest pip-tools into my relpaths branch (an unacceptable PR), so both that and $ pipx run --spec 'pip-tools @ git+https://github.com/AndydeCleyre/pip-tools@feature/relpaths-post-6.8.0' pip-compile requirements.in |
@zachborboacryptofi I'd require good test coverage (including local testing against the main branch of pip). The CI should be green. If there's any tests marked as xfail, they'll need to be unmarked. Nothing else comes to my mind. Note that this is maintained sporadically by a bunch of volunteers so don't expect immediate reviews. @AndydeCleyre could you remind me what's unacceptable in your branch? I vaguely recall you trying something but don't remember the context.. |
@webknjaz While I tried to introduce only as much complexity as needed to reliably track and handle paths, given the constraints of maintaining backward compatibility, and not making changes to pip itself, the final judgment can be found in this comment and the following one. The highlights are:
|
Originally reported here - pypa/pip#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
The text was updated successfully, but these errors were encountered: