1
1
Fork 0
mirror of https://github.com/pypa/pip synced 2023-12-13 21:30:23 +01:00

Merge pull request #8378 from uranusjr/direct-url-fix

Fix direct URL by always passing the template’s URL values into candidate
This commit is contained in:
Paul Moore 2020-06-04 17:31:45 +01:00 committed by GitHub
commit d3ce025e8d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 6 deletions

View file

@ -58,9 +58,8 @@ def make_install_req_from_link(link, template):
hashes=template.hash_options
),
)
if ireq.link is None:
ireq.link = link
# TODO: Handle wheel cache resolution.
ireq.original_link = template.original_link
ireq.link = link
return ireq

View file

@ -1,7 +1,5 @@
import re
import pytest
from pip._internal.models.direct_url import DIRECT_URL_METADATA_NAME, DirectUrl
from tests.lib import _create_test_package, path_to_url
@ -32,7 +30,6 @@ def test_install_vcs_editable_no_direct_url(script, with_wheel):
assert not _get_created_direct_url(result, "testpkg")
@pytest.mark.fails_on_new_resolver
def test_install_vcs_non_editable_direct_url(script, with_wheel):
pkg_path = _create_test_package(script, name="testpkg")
url = path_to_url(pkg_path)