Seems to resolve the two tests that failed when run together as well as maintain the correct behavior of the issue-4637 example script

This commit is contained in:
Matt Davis
2022-03-14 21:16:29 -04:00
parent fcdc402c82
commit bf00739895
2 changed files with 5 additions and 2 deletions
+4 -2
View File
@@ -1416,9 +1416,11 @@ def pip_install(
if not index and requirement.index:
index = requirement.index
if index and not extra_indexes:
extra_indexes = list(project.sources)
extra_indexes = []
if requirement.index:
extra_indexes = list(filter(lambda d: d['name'] == requirement.index, extra_indexes))
extra_indexes = list(filter(lambda d: d['name'] == requirement.index, project.sources))
if not extra_indexes:
extra_indexes = list(project.sources)
if requirement and requirement.vcs or requirement.editable:
requirement.index = None
# Install dependencies when a package is a non-editable VCS dependency.
+1
View File
@@ -897,6 +897,7 @@ class Resolver:
from pipenv.vendor.pip_shims.shims import InstallationError
from pipenv.exceptions import ResolutionFailure
self.constraints # For some reason its important to evaluate constraints before resolver context
with temp_environ(), self.get_resolver() as resolver:
try:
results = resolver.resolve(self.constraints, check_supported_wheels=False)