Merge pull request #9100 from uranusjr/new-resolver-deterministic-ordering

Tie-break requirements with package name
This commit is contained in:
Pradyun Gedam 2020-11-09 03:52:39 +05:30 committed by GitHub
commit ee7c56e031
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 1 deletions

1
news/9100.feature.rst Normal file
View File

@ -0,0 +1 @@
The new resolver now resolves packages in a deterministic order.

View File

@ -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]