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

Add loggable output switch #3594

Closed
IvanAnishchuk opened this issue Mar 29, 2016 · 1 comment
Closed

Add loggable output switch #3594

IvanAnishchuk opened this issue Mar 29, 2016 · 1 comment
Labels
auto-locked Outdated issues that have been locked by automation

Comments

@IvanAnishchuk
Copy link

  • Pip version: 8.1.1
  • Python version: 3.5.1
  • Operating System: Linux (Ubuntu 16.04)

Some form of optional loggable output, especially regarding download progress bar and build rotating thingy. Not for log files, mainly, for stdout.

According to the old design principle, "When a program has nothing surprising to say, it should say nothing." It's not always true nowadays but sometimes it's a really important principle.

If you run pip install in any environment other than "normal" interactive shell (say, over fabric, as we do), you can easily get several hundred lines like this for every single package:

[user@server] out:     0% |                                | 20kB 40.6MB/s eta 0:00:01
[user@server] out:     0% |▏                               | 30kB 41.9MB/s eta 0:00:01
[user@server] out:     0% |▏                               | 40kB 3.7MB/s eta 0:00:02
[user@server] out:     0% |▎                               | 51kB 4.5MB/s eta 0:00:02
[user@server] out:     0% |▎                               | 61kB 5.3MB/s eta 0:00:02
[user@server] out:     1% |▍                               | 71kB 6.0MB/s eta 0:00:02
[user@server] out:     1% |▍                               | 81kB 6.7MB/s eta 0:00:01
[user@server] out:     1% |▌                               | 92kB 7.4MB/s eta 0:00:01
[user@server] out:     1% |▌                               | 102kB 3.7MB/s eta 0:00:02
[user@server] out:     1% |▌                               | 112kB 3.7MB/s eta 0:00:02
[user@server] out:     1% |▋                               | 122kB 3.7MB/s eta 0:00:02
[user@server] out:     2% |▋                               | 133kB 3.7MB/s eta 0:00:02
[user@server] out:     2% |▊                               | 143kB 6.0MB/s eta 0:00:02
[user@server] out:     2% |▊                               | 153kB 6.0MB/s eta 0:00:02

There ought to be a way to replace that with dots or something without using -q switch that often hides many helpful messages (build errors and such) as well as this escape-magic above. And best if pip switches to this loggable mode whenever it detects that the output is not a TTY (that's what wget does, for example) while allowing to force the mode (fabric can emulate TTY).

More complex verbosity switch is also an option, but for this particular issue just loggable output mode will be enough. Speaking of "dots or something", there are several different patterns for console-based progress bars. It might be a good idea to explore possibilities and maybe make it configurable if there are more than one that's good.

@dstufft
Copy link
Member

dstufft commented Mar 24, 2017

This is a duplicate of #2756 which was fixed by #4194.

@dstufft dstufft closed this as completed Mar 24, 2017
@lock lock bot added the auto-locked Outdated issues that have been locked by automation label Jun 3, 2019
@lock lock bot locked as resolved and limited conversation to collaborators Jun 3, 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

2 participants