-
Notifications
You must be signed in to change notification settings - Fork 3k
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
Provide a way to supress progressbar, but display exceptions #2756
Comments
Hmm, the quiet option shouldn't hide errors. I'm ok with ask option to hide the progress bar though.
|
I just want my use case to be solved. If --quiet would show the traceback, it would be a good solution for me. |
i can confirm that $ pip -q install cffi
/var/venv/devserver/local/lib/python2.7/site-packages/pip/_vendor/requests/packages/urllib3/util/ssl_.py:79: InsecurePlatformWarning: A true SSLContext object is not available. This prevents urllib3 from configuring SSL appropriately and may cause certain SSL connections to fail. For more information, see https://urllib3.readthedocs.org/en/latest/security.html#insecureplatformwarning.
InsecurePlatformWarning
Command "/var/venv/devserver/bin/python -c "import setuptools, tokenize;__file__='/tmp/pip-build-IENjBH/cffi/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-5k82OS-record/install-record.txt --single-version-externally-managed --compile --install-headers /var/venv/devserver/include/site/python2.7/cffi" failed with error code 1 in /tmp/pip-build-IENjBH/cffi this is somewhat annoying, because without |
+1 on providing a mechanism to disable the progressbar even with a TTY |
+1 |
1 similar comment
+1 |
Whilst this isn't painful for me right now, having the progress bars output is a bit of a pain since I'd quite like Pip to be used quietly in the background and only error out on exceptions since I catch exit codes. So, this is a +1 from me! |
It would still useful to be able to disable the progress bar without having to resort to I'm happy to open a PR for this -- I was thinking there could be both a command line switch and also an equivalent environment variable (that people like Travis CI could set by default). Any preference as to naming? eg: And for the environment variable: Thanks! :-) |
A PR would be fine with me, though you don't need to do anything special for an environment variable, pip options automatically become environment variables. I would maybe suggest something like |
+1 on this. Hilariously, I ran into this issue in the exact same context: installation of cffi failed in a jenkins build that didn't have libffi.so available, and Adding an option to disable only the progress bar would be nice, but having |
yeah, seems this should be two issues (both of which I'd "me too") |
+1, see also @AvnerCohen 's comment here #2369 (comment) |
+1 - installing somethig with pip on remote host via fabric is really a lot of mess because fabric shows every new state of progress bar on new line, below just a tail of the output. This is also related to #2449 (re disabling ansi colors):
And no - I can't disable tty due to sudo settings restrictions. |
@bialix FWIW the workaround I discovered for scenarios like fabric and jenkins execution of pip is to connect stdout to a pipe -- even if that pipe just in turn connects to its own stdout, it's enough to suppress the progress meters:
Dumb, but it works. See also |
@memory the workaround does not preserve the pip command exit code. |
@piotr-dobrogost Didn't know that, thank you! But I think that stacking more and more workarounds will add unnecessary noise to CI scripts. Personally I'd prefer |
Agreed an option for this would be good. As has been noted, a PR for this would be good, although no-one has taken up that suggestion yet. If anyone does raise a PR, ping me and I'll be happy to review it. |
This should be fixed by #4194 |
Why was this bug closed? The linked merged PR does not really add --no-progress-bar option. |
@ssbarnea |
@pradyunsg Sorry but I get I also did a |
I think this is part of the current main dev version, 10.0.0 (https://github.com/pypa/pip/tree/release/10.0.0), 9.0.x is at maintenance mode with no new features. https://mail.python.org/pipermail/distutils-sig/2017-October/031642.html |
@AvnerCohen Thanks for the update. In this case it would be extremely useful to populate the Milestone field with 10.0.0 value, so others would not confuse @pradyunsg Can you please help with Milestone field? Contributors cannot edit this fields, only Members can. |
A little more forcefully this time since it clearly got lost in the mess above (two years ago, sigh): Regardless of whether pip9 allows turning the progress bar off or not, the fact that The linked message from the distutils-sig mailing list suggests that the full release of pip 10 is "one or two months away" in...October of 2017 (nearly five months ago). And even once 10 comes out of beta, it can be safely assumed that given the API differences that many shops will continue using pip9 for months or years to come as they prioritize their conversions. @AvnerCohen if I managed to put together a PR for pip9 that fixed only this misbehavior, is there any chance at all that it would be accepted and released? |
@memory As @dstufft said above:
This issue is pretty confused, probably because the title refers to suppressing the progress bar (which is covered in pip 10 via If you have a reproducible example of |
The title of this bug refers to the progress bar, but I'll note that the original bug text refers to Anyway I'll stop grousing and install 10.0.0b2, see if it's reproducible there and file a ticket if so. |
@edmorley Because I am trying to write a script like
Then pip says I think using a envion switch is better for compatibility |
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
I we provide the
--quiet
option, pip does not display exceptions like this:Please give us an option to supress the progressbar, but display exceptions.
Thank you.
The text was updated successfully, but these errors were encountered: