Skip to content

Commit

Permalink
Remove error handler around find_all_candidates to see if it fails in…
Browse files Browse the repository at this point in the history
… github actions ci

Run black over tests/unit/test_finder.py
  • Loading branch information
jbylund committed Jul 25, 2023
1 parent af49a5a commit 6ddecdf
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 9 deletions.
9 changes: 1 addition & 8 deletions src/pip/_internal/resolution/resolvelib/resolver.py
Original file line number Diff line number Diff line change
Expand Up @@ -175,15 +175,8 @@ def _prime_finder_cache(self, project_names: Iterable[str]) -> None:
in parallel in order to avoid later blocking on network requests during
resolution.
"""

def _maybe_find_candidates(project_name: str) -> None:
try:
self._finder.find_all_candidates(project_name)
except AttributeError:
pass

with ThreadPool() as tp:
for _ in tp.imap_unordered(_maybe_find_candidates, project_names):
for _ in tp.imap_unordered(self._finder.find_all_candidates, project_names):
pass

def get_installation_order(
Expand Down
1 change: 0 additions & 1 deletion tests/unit/test_finder.py
Original file line number Diff line number Diff line change
Expand Up @@ -569,7 +569,6 @@ def test_find_all_candidates_find_links_and_index(data: TestData) -> None:


def test_finder_caching(data: TestData) -> None:

# This is not required for the behavior of the finder itself, but we exploit
# the implementation of the finder's find_best_candidate consuming it's own
# find_all_candidates cache to pre-populate the cache before the resolution process
Expand Down

0 comments on commit 6ddecdf

Please sign in to comment.