You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
diff --git piptools/resolver.py piptools/resolver.py
index f9d3d12..72c95d5 100644
--- piptools/resolver.py+++ piptools/resolver.py@@ -763,7 +763,10 @@ def _get_install_requirement_from_candidate(
# Prepare pinned install requirement. Copy it from candidate's install
# requirement so that it could be mutated later.
- pinned_ireq = copy_install_requirement(ireq)+ kwargs = {}+ if candidate.source_link is not None:+ kwargs['link'] = candidate.source_link+ pinned_ireq = copy_install_requirement(ireq, **kwargs)
# Canonicalize name
assert ireq.name is not None
Hack writer
diff --git piptools/utils.py piptools/utils.py
index 47f3637..c7624dd 100644
--- piptools/utils.py+++ piptools/utils.py@@ -119,7 +119,9 @@ def format_requirement(
in a less verbose way than using its `__str__` method.
"""
if ireq.editable:
- line = f"-e {ireq.link.url}"+ req = ireq.req+ url = req.url if req and req.url else ireq.link.url+ line = f"-e {url}"
elif is_url_requirement(ireq):
line = _build_direct_reference_best_efforts(ireq)
else:
However, need some research on how InstallRequirement.link and caches work.
If an
@ git+
requirement is present in pip's wheel cache,pip-compile --resolver backtracking
will pin to@ file://....whl
.(Moved from #1539 (comment).
@ git+
pinned package switched frompip-tools
totypeguard
for clarity.)Environment Versions
Steps to replicate
Expected result
Actual result
The text was updated successfully, but these errors were encountered: