-
-
Notifications
You must be signed in to change notification settings - Fork 611
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
Fixup relative and absolute path handling #1329
Commits on Jun 16, 2022
-
Add optional param from_dir to format_requirement
If passed, it will attempt to relative-ize the resulting URL (if possible). Add helper: fragment_string
Configuration menu - View commit details
-
Copy full SHA for 399f1ea - Browse repository at this point
Copy the full SHA 399f1eaView commit details -
Configuration menu - View commit details
-
Copy full SHA for c9c00fb - Browse repository at this point
Copy the full SHA c9c00fbView commit details -
Configuration menu - View commit details
-
Copy full SHA for afea149 - Browse repository at this point
Copy the full SHA afea149View commit details -
Add abs_ireq for normalizing ireqs, and related tests
- abs_ireq_preserves_source_ireqs - format_requirement_impossible_relative_path_becomes_absolute (Windows-only)
Configuration menu - View commit details
-
Copy full SHA for 8168ad2 - Browse repository at this point
Copy the full SHA 8168ad2View commit details -
Update test to expect and accept more Windows file URIs
Specifically ones which start like file:///C:/
Configuration menu - View commit details
-
Copy full SHA for df6f78b - Browse repository at this point
Copy the full SHA df6f78bView commit details -
Add writer test for annotation accuracy regarding source ireqs
Ensure source ireqs' comes_from attr is credited in annotations
Configuration menu - View commit details
-
Copy full SHA for 09003f6 - Browse repository at this point
Copy the full SHA 09003f6View commit details -
Add optional param from_dir to _comes_from_as_string
This brings with it more involved string manipulation
Configuration menu - View commit details
-
Copy full SHA for 6398866 - Browse repository at this point
Copy the full SHA 6398866View commit details -
Add optional from_dir param to parse_requirements
If passed, from_dir will be used instead of CWD to interpret relative paths. Special care is taken to guarantee _was_relative in the yielded ireqs, if originally relative. When calling format_requirement, _was_relative's presence now determines what's passed as from_dir: either CWD or None (None leads to an absolute path output)
Configuration menu - View commit details
-
Copy full SHA for d68ea31 - Browse repository at this point
Copy the full SHA d68ea31View commit details -
Add flag for compile: --write-relative-to-output
With test, and needed changes: - Use this flag to decide what to pass as from_dir to parse_requirements - Add init param to OutputWriter: write_relative_to_output - Add corresponding from_dir logic and use to OutputWriter._format_requirement - Add test_write_relative_to_output which runs with the new flag both on and off
Configuration menu - View commit details
-
Copy full SHA for 8f7f633 - Browse repository at this point
Copy the full SHA 8f7f633View commit details -
Add test_local_editable_vcs_package
This ensures absolute intact paths for git+file: reqs
Configuration menu - View commit details
-
Copy full SHA for 97fe407 - Browse repository at this point
Copy the full SHA 97fe407View commit details -
Add flag to sync: --read-relative-to-input
With test_sync_relative_path If the reqs in the output were written relative to that output file (pip-compile --write-relative-to-output), then it's wise for pip-sync to interpret reqs it finds in there from the location of the output file. This is now possible with pip-sync --read-relative-to-input. To be clear: pip-sync's "input" is pip-compile's "output."
Configuration menu - View commit details
-
Copy full SHA for 76186c4 - Browse repository at this point
Copy the full SHA 76186c4View commit details -
Absolute-ize src_file paths and more safely determine output file paths
This fixes at least two problems, for which tests are added.
Configuration menu - View commit details
-
Copy full SHA for dedfa56 - Browse repository at this point
Copy the full SHA dedfa56View commit details -
Configuration menu - View commit details
-
Copy full SHA for e74f317 - Browse repository at this point
Copy the full SHA e74f317View commit details -
Add flag for compile: --read-relative-to-input
And add tests via parameterization
Configuration menu - View commit details
-
Copy full SHA for e182c21 - Browse repository at this point
Copy the full SHA e182c21View commit details -
Configuration menu - View commit details
-
Copy full SHA for e496d34 - Browse repository at this point
Copy the full SHA e496d34View commit details -
Configuration menu - View commit details
-
Copy full SHA for b631521 - Browse repository at this point
Copy the full SHA b631521View commit details -
Configuration menu - View commit details
-
Copy full SHA for fd7e470 - Browse repository at this point
Copy the full SHA fd7e470View commit details -
Configuration menu - View commit details
-
Copy full SHA for 1141ae7 - Browse repository at this point
Copy the full SHA 1141ae7View commit details -
Configuration menu - View commit details
-
Copy full SHA for 0d4f957 - Browse repository at this point
Copy the full SHA 0d4f957View commit details -
Configuration menu - View commit details
-
Copy full SHA for 6710a45 - Browse repository at this point
Copy the full SHA 6710a45View commit details -
Replicate pip's install_req_from_link_and_ireq in utils
For compatibility with pip<21.1
Configuration menu - View commit details
-
Copy full SHA for 03a51cc - Browse repository at this point
Copy the full SHA 03a51ccView commit details -
Avoid choking on a relative path without scheme prefix, with fragment
e.g. ../../rawr#egg=rawr-cli
Configuration menu - View commit details
-
Copy full SHA for 9501a9d - Browse repository at this point
Copy the full SHA 9501a9dView commit details -
Improve our version of install_req_from_link_and_ireq (diverge)
... to properly set .extras
Configuration menu - View commit details
-
Copy full SHA for af758d5 - Browse repository at this point
Copy the full SHA af758d5View commit details -
Improve consistency of output regarding fragments and extras
This fixes false-positive _was_relative assignments for some direct references like: ptrender[yaml] @ file:///home/andy/Code/ptrender
Configuration menu - View commit details
-
Copy full SHA for c239939 - Browse repository at this point
Copy the full SHA c239939View commit details -
Configuration menu - View commit details
-
Copy full SHA for 6306971 - Browse repository at this point
Copy the full SHA 6306971View commit details -
Remove fragment_string parameter omit_extras
As we always want to set that True
Configuration menu - View commit details
-
Copy full SHA for 6a5d208 - Browse repository at this point
Copy the full SHA 6a5d208View commit details -
Configuration menu - View commit details
-
Copy full SHA for cbf604d - Browse repository at this point
Copy the full SHA cbf604dView commit details -
Configuration menu - View commit details
-
Copy full SHA for b10ae67 - Browse repository at this point
Copy the full SHA b10ae67View commit details -
Further diverge from pip's install_req_from_link_and_ireq
Preserve ireq.constraint and _source_ireqs
Configuration menu - View commit details
-
Copy full SHA for bfe7d07 - Browse repository at this point
Copy the full SHA bfe7d07View commit details -
More thorough install_req_from_link_and_ireq
At this code point we currently expect the original ireq.extras to be an empty set every time, so this does not change any current behavior. But if in the future ireqs with already parsed extras are passed, it should now preserve those.
Configuration menu - View commit details
-
Copy full SHA for 50484ec - Browse repository at this point
Copy the full SHA 50484ecView commit details -
Configuration menu - View commit details
-
Copy full SHA for e124089 - Browse repository at this point
Copy the full SHA e124089View commit details -
Configuration menu - View commit details
-
Copy full SHA for 4893794 - Browse repository at this point
Copy the full SHA 4893794View commit details -
Configuration menu - View commit details
-
Copy full SHA for 0a4ef9a - Browse repository at this point
Copy the full SHA 0a4ef9aView commit details -
Construct relative req lines to match what pip install understands
Based on findings at jazzband#1329 (comment)
Configuration menu - View commit details
-
Copy full SHA for 90a7097 - Browse repository at this point
Copy the full SHA 90a7097View commit details