Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[fast-deps] Late download logs are over indented #8721

Closed
McSinyx opened this issue Aug 6, 2020 · 0 comments · Fixed by #8722
Closed

[fast-deps] Late download logs are over indented #8721

McSinyx opened this issue Aug 6, 2020 · 0 comments · Fixed by #8722
Labels
type: enhancement Improvements to functionality

Comments

@McSinyx
Copy link
Contributor

McSinyx commented Aug 6, 2020

Environment

  • pip version: 20.2.1 current master
  • Python version: irrelevant
  • OS: irrelevant

Description

During final preparation that downloads the wheels skipped wheels, the logs are over-indented which make the overall output a bit confusing:

$ pip --use-feature=2020-resolver --use-feature=fast-deps download scipy
WARNING: pip is using lazily downloaded wheels using HTTP range requests to obtain dependency information. This experimental feature is enabled through --use-feature=fast-deps and it is not ready for production.
Collecting scipy
  Obtaining dependency information from scipy 1.5.2
Collecting numpy>=1.14.5
  Obtaining dependency information from numpy 1.19.1
  Downloading scipy-1.5.2-cp38-cp38-manylinux1_x86_64.whl (25.7 MB)
     |████████████████████████████████| 25.7 MB 7.8 MB/s 
  Saved ./scipy-1.5.2-cp38-cp38-manylinux1_x86_64.whl
  Downloading numpy-1.19.1-cp38-cp38-manylinux2010_x86_64.whl (14.5 MB)
     |████████████████████████████████| 14.5 MB 7.2 MB/s 
  Saved ./numpy-1.19.1-cp38-cp38-manylinux2010_x86_64.whl

This is due to _prepare_linked_requirement assumes the indentation level, which is not needed when called from prepare_linked_requirement_more:

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)
def _prepare_linked_requirement(self, req, parallel_builds):
# type: (InstallRequirement, bool) -> Distribution
assert req.link
link = req.link
if link.is_wheel and self.wheel_download_dir:
# Download wheels to a dedicated dir when doing `pip wheel`.
download_dir = self.wheel_download_dir
else:
download_dir = self.download_dir
with indent_log():

Expected behavior

$ pip --use-feature=2020-resolver --use-feature=fast-deps download scipy
WARNING: pip is using lazily downloaded wheels using HTTP range requests to obtain dependency information. This experimental feature is enabled through --use-feature=fast-deps and it is not ready for production.
Collecting scipy
  Obtaining dependency information from scipy 1.5.2
Collecting numpy>=1.14.5
  Obtaining dependency information from numpy 1.19.1
Downloading scipy-1.5.2-cp38-cp38-manylinux1_x86_64.whl (25.7 MB)
  |████████████████████████████████| 25.7 MB 7.8 MB/s 
Saved ./scipy-1.5.2-cp38-cp38-manylinux1_x86_64.whl
Downloading numpy-1.19.1-cp38-cp38-manylinux2010_x86_64.whl (14.5 MB)
   |████████████████████████████████| 14.5 MB 7.2 MB/s 
Saved ./numpy-1.19.1-cp38-cp38-manylinux2010_x86_64.whl
@triage-new-issues triage-new-issues bot added the S: needs triage Issues/PRs that need to be triaged label Aug 6, 2020
@pradyunsg pradyunsg added the type: enhancement Improvements to functionality label Aug 13, 2020
@pradyunsg pradyunsg removed the S: needs triage Issues/PRs that need to be triaged label Feb 12, 2021
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Oct 2, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
type: enhancement Improvements to functionality
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants