mirror of https://github.com/pypa/pip
Optimize upgrade of already-satisfied pinned requirement (#7132)
This commit is contained in:
commit
f718a8f34c
|
@ -0,0 +1 @@
|
|||
Skip reaching out to the package index, if a pinned version is already satisfied.
|
|
@ -267,6 +267,10 @@ class Resolver(object):
|
|||
# requirements we have to pull the tree down and inspect to assess
|
||||
# the version #, so it's handled way down.
|
||||
if not req_to_install.link:
|
||||
if req_to_install.is_pinned:
|
||||
# No need to check the index for a better version.
|
||||
return 'already satisfied'
|
||||
|
||||
try:
|
||||
self.finder.find_requirement(req_to_install, upgrade=True)
|
||||
except BestVersionAlreadyInstalled:
|
||||
|
|
Loading…
Reference in New Issue