mirror of https://github.com/pypa/pip
Sort applicable candidates before computing best candidate
This commit is contained in:
parent
d38cead031
commit
0f03a05207
|
@ -473,12 +473,14 @@ class CandidateEvaluator(object):
|
|||
c for c in candidates if str(c.version) in versions
|
||||
]
|
||||
|
||||
return filter_unallowed_hashes(
|
||||
filtered_applicable_candidates = filter_unallowed_hashes(
|
||||
candidates=applicable_candidates,
|
||||
hashes=self._hashes,
|
||||
project_name=self._project_name,
|
||||
)
|
||||
|
||||
return sorted(filtered_applicable_candidates, key=self._sort_key)
|
||||
|
||||
def _sort_key(self, candidate):
|
||||
# type: (InstallationCandidate) -> CandidateSortingKey
|
||||
"""
|
||||
|
|
Loading…
Reference in New Issue