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

Option to force the progress bar #8431

Open
jmd-dk opened this issue Jun 11, 2020 · 0 comments
Open

Option to force the progress bar #8431

jmd-dk opened this issue Jun 11, 2020 · 0 comments
Labels
S: needs triage Issues/PRs that need to be triaged type: feature request Request for a new feature

Comments

@jmd-dk
Copy link

jmd-dk commented Jun 11, 2020

What's the problem this feature will solve?
As described here, pip seems to automatically detect when its output is not going to a TTY, in which case it disables the progress bar during downloads. It would be nice to have an option to force the progress bar anyway.
This is a desirable feature when using pip from within scripts which want to log the output while still showing the progress bar.

Examples:

pip download --no-cache-dir                   scipy            # ✅ progress bar
pip download --no-cache-dir --progress-bar=on scipy            # ✅ progress bar
pip download --no-cache-dir                   scipy | tee log  # ❌ progress bar
pip download --no-cache-dir --progress-bar=on scipy | tee log  # ❌ progress bar

(remember to remove the downloads after running each command).

Describe the solution you'd like
Taking inspiration from wget (where the exact same situation arise), one could allow for an additional suffix :force on the values of the --progress-bar option (currently off|on|ascii|pretty|emoji).
To force the progress bar in the previous example would then look like:

pip download --no-cache-dir --progress-bar=on:force scipy | tee log

Alternative Solutions
If adding functionality to the existing --progress-bar option is considered bad, one can always invent a whole new option, e.g.

pip download --no-cache-dir --force-progress-bar scipy | tee log
@triage-new-issues triage-new-issues bot added the S: needs triage Issues/PRs that need to be triaged label Jun 11, 2020
@DiddiLeija DiddiLeija added the type: feature request Request for a new feature label Aug 27, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S: needs triage Issues/PRs that need to be triaged type: feature request Request for a new feature
Projects
None yet
Development

No branches or pull requests

2 participants