-
Notifications
You must be signed in to change notification settings - Fork 3.1k
Closed
Labels
type: bugA confirmed bug or unintended behaviorA confirmed bug or unintended behavior
Description
For instance,
$ pip download pip
Collecting pip
Using cached pip-20.2.1-py2.py3-none-any.whl (1.5 MB)
Saved ./pip-20.2.1-py2.py3-none-any.whl
Successfully downloaded pip
$ rm pip*
$ pip download pip
Collecting pip
Using cached pip-20.2.1-py2.py3-none-any.whl (1.5 MB)
Saved ./pip-20.2.1-py2.py3-none-any.whl
This traces back to
pip/src/pip/_internal/commands/download.py
Lines 137 to 139 in ee4371c
downloaded = ' '.join([req.name # type: ignore | |
for req in requirement_set.requirements.values() | |
if req.successfully_downloaded]) |
InstallRequirement.successfully_downloaded
. With GH-8685 merged, we can use successfully_downloaded
in place of not needs_more_preparation
and solve the issue:
pip/src/pip/_internal/operations/prepare.py
Lines 481 to 498 in ee4371c
def prepare_linked_requirement(self, req, parallel_builds=False): | |
# type: (InstallRequirement, bool) -> Distribution | |
"""Prepare a requirement to be obtained from req.link.""" | |
assert req.link | |
link = req.link | |
self._log_preparing_link(req) | |
wheel_dist = self._fetch_metadata(link) | |
if wheel_dist is not None: | |
req.needs_more_preparation = True | |
return wheel_dist | |
return self._prepare_linked_requirement(req, parallel_builds) | |
def prepare_linked_requirement_more(self, req, parallel_builds=False): | |
# type: (InstallRequirement, bool) -> None | |
"""Prepare a linked requirement more, if needed.""" | |
if not req.needs_more_preparation: | |
return | |
self._prepare_linked_requirement(req, parallel_builds) |
This happens to be the part I'm working on at the moment, so if it is not urgent, I will submit a patch in around 12 hours.
Metadata
Metadata
Assignees
Labels
type: bugA confirmed bug or unintended behaviorA confirmed bug or unintended behavior