Skip to content

Commit d3ce025

Browse files
authored
Merge pull request #8378 from uranusjr/direct-url-fix
Fix direct URL by always passing the template’s URL values into candidate
2 parents 85ce4df + fe529c1 commit d3ce025

File tree

2 files changed

+2
-6
lines changed

2 files changed

+2
-6
lines changed

src/pip/_internal/resolution/resolvelib/candidates.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -58,9 +58,8 @@ def make_install_req_from_link(link, template):
5858
hashes=template.hash_options
5959
),
6060
)
61-
if ireq.link is None:
62-
ireq.link = link
63-
# TODO: Handle wheel cache resolution.
61+
ireq.original_link = template.original_link
62+
ireq.link = link
6463
return ireq
6564

6665

tests/functional/test_install_direct_url.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
import re
22

3-
import pytest
4-
53
from pip._internal.models.direct_url import DIRECT_URL_METADATA_NAME, DirectUrl
64
from tests.lib import _create_test_package, path_to_url
75

@@ -32,7 +30,6 @@ def test_install_vcs_editable_no_direct_url(script, with_wheel):
3230
assert not _get_created_direct_url(result, "testpkg")
3331

3432

35-
@pytest.mark.fails_on_new_resolver
3633
def test_install_vcs_non_editable_direct_url(script, with_wheel):
3734
pkg_path = _create_test_package(script, name="testpkg")
3835
url = path_to_url(pkg_path)

0 commit comments

Comments
 (0)