mirror of
https://github.com/pypa/pip
synced 2023-12-13 21:30:23 +01:00
Tie-break requirements with package name
This makes the ordering deterministic to improve debugging and user experience.
This commit is contained in:
parent
0512785fbe
commit
69a95cf391
2 changed files with 3 additions and 1 deletions
1
news/9100.feature.rst
Normal file
1
news/9100.feature.rst
Normal file
|
@ -0,0 +1 @@
|
|||
The new resolver now resolves packages in a deterministic order.
|
|
@ -57,7 +57,8 @@ class PipProvider(AbstractProvider):
|
|||
):
|
||||
# type: (...) -> Any
|
||||
transitive = all(parent is not None for _, parent in information)
|
||||
return (transitive, bool(candidates))
|
||||
key = next(iter(candidates)).name if candidates else ""
|
||||
return (transitive, key)
|
||||
|
||||
def find_matches(self, requirements):
|
||||
# type: (Sequence[Requirement]) -> Iterable[Candidate]
|
||||
|
|
Loading…
Reference in a new issue