Skip to content

Commit 6a0d1f6

Browse files
committed
Reduce the maximum resolver rounds by an order of magnitude
This reduces how much pip will attempt to backtrack.
1 parent 28239f9 commit 6a0d1f6

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

news/11908.feature.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Reduce the number of resolver rounds, since backjumping makes the resolver more efficient in finding solutions. This also makes pathological cases fail quicker.

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -88,9 +88,9 @@ def resolve(
8888
)
8989

9090
try:
91-
try_to_avoid_resolution_too_deep = 2000000
91+
limit_how_complex_resolution_can_be = 200000
9292
result = self._result = resolver.resolve(
93-
collected.requirements, max_rounds=try_to_avoid_resolution_too_deep
93+
collected.requirements, max_rounds=limit_how_complex_resolution_can_be
9494
)
9595

9696
except ResolutionImpossible as e:

0 commit comments

Comments
 (0)