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