Skip to content

Fix direct URL by always passing the template’s URL values into candidate #8378

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

Merged
merged 3 commits into from
Jun 4, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions src/pip/_internal/resolution/resolvelib/candidates.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,9 +57,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


Expand Down
3 changes: 0 additions & 3 deletions tests/functional/test_install_direct_url.py
Original file line number Diff line number Diff line change
@@ -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

Expand Down Expand Up @@ -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)
Expand Down