Skip to content

Commit 11f7994

Browse files
committed
Revise method fetching metadata using lazy wheels
* Rename it to fit the fact that it no longer handle fetching _not_ using lazy wheels * Use self as the first parameter * Unnest the checks with additional logs showing reason when lazy wheel is not used
1 parent 487d002 commit 11f7994

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/pip/_internal/operations/prepare.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99
import os
1010
import shutil
1111

12-
from pip._vendor.contextlib2 import suppress
1312
from pip._vendor.packaging.utils import canonicalize_name
1413
from pip._vendor.six import PY2
1514

@@ -462,7 +461,7 @@ def _get_linked_req_hashes(self, req):
462461
# showing the user what the hash should be.
463462
return req.hashes(trust_internet=False) or MissingHashes()
464463

465-
def _fetch_metadata(preparer, link):
464+
def _fetch_metadata_using_lazy_wheel(self, link):
466465
# type: (Link) -> Optional[Distribution]
467466
"""Fetch metadata using lazy wheel, if possible."""
468467
if not self.use_lazy_wheel:
@@ -497,7 +496,8 @@ def prepare_linked_requirement(self, req, parallel_builds=False):
497496
assert req.link
498497
link = req.link
499498
self._log_preparing_link(req)
500-
wheel_dist = self._fetch_metadata(link)
499+
with indent_log():
500+
wheel_dist = self._fetch_metadata_using_lazy_wheel(link)
501501
if wheel_dist is not None:
502502
req.needs_more_preparation = True
503503
return wheel_dist

0 commit comments

Comments
 (0)