Skip to content

Commit

Permalink
Only search the Pipenv default index when an alternative index is not…
Browse files Browse the repository at this point in the history
… specified.
  • Loading branch information
matteius committed Jun 16, 2023
1 parent 0dcfd08 commit b0ff31e
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 2 additions & 0 deletions pipenv/patched/pip/_internal/models/search_scope.py
Original file line number Diff line number Diff line change
Expand Up @@ -136,4 +136,6 @@ def mkurl_pypi_url(url: str) -> str:
index_urls = self.index_urls
if project_name in self.index_lookup:
index_urls = [self.index_lookup[project_name]]
else:
index_urls = [self.index_urls[0]]
return [mkurl_pypi_url(url) for url in index_urls]
4 changes: 3 additions & 1 deletion tasks/vendoring/patches/patched/pip_index_safety.patch
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ index 0120610c..ead5227e 100644
return link_collector

diff --git a/pipenv/patched/pip/_internal/models/search_scope.py b/pipenv/patched/pip/_internal/models/search_scope.py
index a64af738..0674ed07 100644
index a64af738..76c44656 100644
--- a/pipenv/patched/pip/_internal/models/search_scope.py
+++ b/pipenv/patched/pip/_internal/models/search_scope.py
@@ -3,7 +3,7 @@ import logging
Expand Down Expand Up @@ -94,4 +94,6 @@ index a64af738..0674ed07 100644
+ index_urls = self.index_urls
+ if project_name in self.index_lookup:
+ index_urls = [self.index_lookup[project_name]]
+ else:
+ index_urls = [self.index_urls[0]]
+ return [mkurl_pypi_url(url) for url in index_urls]

0 comments on commit b0ff31e

Please sign in to comment.