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

Allow to silence download progress bar #2369

Closed
bittner opened this issue Jan 21, 2015 · 5 comments
Closed

Allow to silence download progress bar #2369

bittner opened this issue Jan 21, 2015 · 5 comments
Labels
auto-locked Outdated issues that have been locked by automation

Comments

@bittner
Copy link

bittner commented Jan 21, 2015

Version 6.0 of pip introduced a download progress bar to make make watching pip download a package more enjoyable. Until version 1.5.6 the progress was only indicated by a percentage count moving up.

The verbose progress bar is nice in general, however, it fills log files more quickly (e.g. when you log automatic deployments) and makes them less readable. Unfortunately, it doesn't look like that it's possible to silence only the progress bar, just --quiet is available as a command line option, which then silences the execution of (e.g.) pip install -r requirements.txt completely though.

An option to selectively silence parts of the installation progress, including the download progress bar specifically, would be very nice.

@dstufft
Copy link
Member

dstufft commented Jan 21, 2015

Hmm, the download bar should only show itself if sys.stdout is a tty. Is whatever you're using to log pretending to be a tty without supporting ANSI escape codes?

Example:

$ pip install Django --no-cache-dir | cat
Collecting Django
  Downloading Django-1.7.3-py2.py3-none-any.whl (7.4MB)
Installing collected packages: Django

Successfully installed Django-1.7.3

Doesn't show the progress bar because a pipe isn't a tty.

@bittner
Copy link
Author

bittner commented Jan 22, 2015

That's Fabric executing pip install -r requirements.txt from within a Vagrant box (the latter probably doesn't make a difference). The output is triangles growing from the left are drawn instead of a static growing bar. Something like a CR -> LF (\r to \n) translation is happening.

The Fabric run() command uses SSH underneath.

@dstufft
Copy link
Member

dstufft commented Jan 22, 2015

I think what you want to do is just pass pty=False to your run command that uses pip.

@bittner
Copy link
Author

bittner commented Feb 4, 2015

@dstufft Passing pty=False as an argument to run() in Fabric works fine. Thanks!
Related documentation is found in the Interaction section of the Fabric docs.

@AvnerCohen
Copy link
Contributor

This works for run() but not for sudo() (unless sudo is configured to allow non tty commands).
Surely this can be resolved somehow, but why couple these two so separate concerns?
a --no-progress seems like a good focused solution. for CI systems, the progress bar is really just extra noise.

@lock lock bot added the auto-locked Outdated issues that have been locked by automation label Jun 4, 2019
@lock lock bot locked as resolved and limited conversation to collaborators Jun 4, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
auto-locked Outdated issues that have been locked by automation
Projects
None yet
Development

No branches or pull requests

3 participants