Skip to content

Commit 2d57052

Browse files
committed
(joe) unsure why it's ok for find_all_candidates to fail sometimes but not others
1 parent d15eddd commit 2d57052

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

src/pip/_internal/resolution/resolvelib/resolver.py

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -90,11 +90,15 @@ def resolve(
9090
reporter,
9191
)
9292

93+
def _maybe_find_candidates(req):
94+
ident = provider.identify(req)
95+
try:
96+
self.factory._finder.find_all_candidates(ident)
97+
except AttributeError:
98+
pass
99+
93100
with ThreadPool() as tp:
94-
for _ in tp.imap_unordered(
95-
self.factory._finder.find_all_candidates,
96-
(provider.identify(r) for r in collected.requirements),
97-
):
101+
for _ in tp.imap_unordered(_maybe_find_candidates, collected.requirements):
98102
pass
99103

100104
try:

0 commit comments

Comments
 (0)