Skip to content

Commit

Permalink
Remove depth preference
Browse files Browse the repository at this point in the history
  • Loading branch information
notatallshaw committed Nov 1, 2024
1 parent d309e2c commit 03d9fd8
Showing 1 changed file with 0 additions and 17 deletions.
17 changes: 0 additions & 17 deletions src/pip/_internal/resolution/resolvelib/provider.py
Original file line number Diff line number Diff line change
Expand Up @@ -158,22 +158,6 @@ def get_preference(
pinned = any(op[:2] == "==" for op in operators)
unfree = bool(operators)

try:
requested_order: Union[int, float] = self._user_requested[identifier]
except KeyError:
requested_order = math.inf
if has_information:
parent_depths = (
self._known_depths[parent.name] if parent is not None else 0.0
for _, parent in information[identifier]
)
inferred_depth = min(d for d in parent_depths) + 1.0
else:
inferred_depth = math.inf
else:
inferred_depth = 1.0
self._known_depths[identifier] = inferred_depth

requested_order = self._user_requested.get(identifier, math.inf)

# Requires-Python has only one candidate and the check is basically
Expand All @@ -190,7 +174,6 @@ def get_preference(
not direct,
not pinned,
not backtrack_cause,
inferred_depth,
requested_order,
not unfree,
identifier,
Expand Down

0 comments on commit 03d9fd8

Please sign in to comment.