Skip to content

Commit 3b5ac13

Browse files
committed
(joe) update news, turn finder into a public attribute of resolver class, test lack_sem_open false directly
1 parent 24f76da commit 3b5ac13

File tree

2 files changed

+4
-9
lines changed

2 files changed

+4
-9
lines changed

news/10480.feature.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
Prepopulate find_all_candidates cache in parallel to reduce overhead when collecting packages to install.
1+
Parallelize network requests when finding package candidates for installation.

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

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ def __init__(
5454
):
5555
super().__init__()
5656
assert upgrade_strategy in self._allowed_strategies
57-
57+
self.finder = finder
5858
self.factory = Factory(
5959
finder=finder,
6060
preparer=preparer,
@@ -90,13 +90,8 @@ def resolve(
9090
reporter,
9191
)
9292

93-
if LACK_SEM_OPEN:
94-
# if a working threading implementation unavailable do nothing
95-
pass
96-
else:
97-
# otherwise greedily call/consume _finder.find_all_candidates in parallel
98-
# in order to populate the lru cache such that future calls don't block on
99-
# networking
93+
if LACK_SEM_OPEN is False:
94+
10095
def _maybe_find_candidates(req: Requirement) -> None:
10196
ident = provider.identify(req)
10297
try:

0 commit comments

Comments
 (0)