From 9bc26b056f0dcb1fad284735d2c7788e9d97e0fc Mon Sep 17 00:00:00 2001 From: Matt Davis Date: Sun, 2 Oct 2022 09:44:55 -0400 Subject: [PATCH] Prefer to use the lockfile sources if available since this is used in install phase (#5380) * Prefer to use the lockfile sources if available since this is used in install phase. * Add news fragment. --- news/5380.bugfix.rst | 1 + pipenv/utils/indexes.py | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) create mode 100644 news/5380.bugfix.rst diff --git a/news/5380.bugfix.rst b/news/5380.bugfix.rst new file mode 100644 index 0000000000..7f4dcc9227 --- /dev/null +++ b/news/5380.bugfix.rst @@ -0,0 +1 @@ +Prefer to use the lockfile sources if available during the install phase. diff --git a/pipenv/utils/indexes.py b/pipenv/utils/indexes.py index f2770adfd9..667c6d7e4a 100644 --- a/pipenv/utils/indexes.py +++ b/pipenv/utils/indexes.py @@ -84,12 +84,12 @@ def get_source_list( if not sources or extra_src["url"] != sources[0]["url"]: sources.append(extra_src) - for source in project.pipfile_sources: + for source in project.sources: if not sources or source["url"] != sources[0]["url"]: sources.append(source) if not sources: - sources = project.pipfile_sources[:] + sources = project.sources[:] if pypi_mirror: sources = [ create_mirror_source(pypi_mirror) if is_pypi_url(source["url"]) else source