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

progress bar uses stderr instead of stdout #7145

Closed
Bezier89 opened this issue Apr 10, 2018 · 5 comments · Fixed by #7146
Closed

progress bar uses stderr instead of stdout #7145

Bezier89 opened this issue Apr 10, 2018 · 5 comments · Fixed by #7146
Labels
locked [bot] locked due to inactivity severity::3 major; broken functionality with a workaround source::community catch-all for issues filed by community members type::bug describes erroneous operation, use severity::* to classify the type
Milestone

Comments

@Bezier89
Copy link
Contributor

Bezier89 commented Apr 10, 2018

This appears to be a regression of #536

conda version : 4.5.0
conda-build version : 3.8.0
python version : 3.5.5.final.0
platform : win-64

Run a command such as follows:

conda create --yes -n TestEnv1 requests > stdout.txt 2> stderr.txt

Note that all the progress bar output goes into stderr.txt, while the rest goes into stdout.txt, as expected. Here's my stderr.txt:

win_inet_pton 1.0.1: | 0%
win_inet_pton 1.0.1: ########## | 100%

cffi 1.11.5: | 0%
cffi 1.11.5: #######5 | 75%
cffi 1.11.5: #########6 | 96%
cffi 1.11.5: ########## | 100%

pycparser 2.18: | 0%
pycparser 2.18: #######5 | 75%
pycparser 2.18: #########7 | 97%
pycparser 2.18: ########## | 100%

pip 9.0.3: | 0%
pip 9.0.3: #3 | 14%
pip 9.0.3: #####7 | 57%
pip 9.0.3: #######5 | 75%
pip 9.0.3: ########7 | 87%
pip 9.0.3: #########6 | 97%
pip 9.0.3: ########## | 100%

chardet 3.0.4: | 0%
chardet 3.0.4: #######5 | 75%
chardet 3.0.4: #########5 | 95%
chardet 3.0.4: ########## | 100%

six 1.11.0: | 0%
six 1.11.0: ########1 | 82%
six 1.11.0: ########## | 100%

vs2015_runtime 14.0.25420: | 0%
vs2015_runtime 14.0.25420: ###1 | 31%
vs2015_runtime 14.0.25420: #######5 | 75%
vs2015_runtime 14.0.25420: ########5 | 86%
vs2015_runtime 14.0.25420: #########5 | 95%
vs2015_runtime 14.0.25420: ########## | 100%

certifi 2018.1.18: | 0%
certifi 2018.1.18: ########8 | 88%
certifi 2018.1.18: ########## | 100%

openssl 1.0.2o: | 0%
openssl 1.0.2o: 1 | 2%
openssl 1.0.2o: #8 | 18%
openssl 1.0.2o: ###6 | 36%
openssl 1.0.2o: #####4 | 55%
openssl 1.0.2o: #######3 | 73%
openssl 1.0.2o: ########5 | 86%
openssl 1.0.2o: #########5 | 96%
openssl 1.0.2o: ########## | 100%

idna 2.6: | 0%
idna 2.6: #######8 | 79%
idna 2.6: ########## | 100%

asn1crypto 0.24.0: | 0%
asn1crypto 0.24.0: #######5 | 75%
asn1crypto 0.24.0: #########5 | 95%
asn1crypto 0.24.0: ########## | 100%

pysocks 1.6.8: | 0%
pysocks 1.6.8: ########## | 100%

cryptography 2.2.2: | 0%
cryptography 2.2.2: 2 | 2%
cryptography 2.2.2: #######5 | 75%
cryptography 2.2.2: #########3 | 93%
cryptography 2.2.2: ########## | 100%

urllib3 1.22: | 0%
urllib3 1.22: #######5 | 75%
urllib3 1.22: #########5 | 96%
urllib3 1.22: ########## | 100%

requests 2.18.4: | 0%
requests 2.18.4: #######7 | 77%
requests 2.18.4: ########## | 100%

python 3.6.5: | 0%
python 3.6.5: 2 | 3%
python 3.6.5: 7 | 7%
python 3.6.5: #2 | 12%
python 3.6.5: #6 | 17%
python 3.6.5: ##1 | 21%
python 3.6.5: ##5 | 26%
python 3.6.5: ### | 30%
python 3.6.5: ###4 | 35%
python 3.6.5: ###9 | 40%
python 3.6.5: ####4 | 44%
python 3.6.5: ####8 | 48%
python 3.6.5: #####2 | 53%
python 3.6.5: #####7 | 58%
python 3.6.5: ######2 | 62%
python 3.6.5: ######6 | 67%
python 3.6.5: #######1 | 71%
python 3.6.5: #######5 | 76%
python 3.6.5: #######8 | 79%
python 3.6.5: ########1 | 81%
python 3.6.5: ########2 | 83%
python 3.6.5: ########4 | 84%
python 3.6.5: ########5 | 85%
python 3.6.5: ########5 | 86%
python 3.6.5: ########6 | 87%
python 3.6.5: ########7 | 87%
python 3.6.5: ########7 | 88%
python 3.6.5: ########8 | 88%
python 3.6.5: ########8 | 89%
python 3.6.5: ########8 | 89%
python 3.6.5: ########9 | 89%
python 3.6.5: ########9 | 90%
python 3.6.5: ########9 | 90%
python 3.6.5: ######### | 90%
python 3.6.5: ######### | 91%
python 3.6.5: ######### | 91%
python 3.6.5: #########1 | 91%
python 3.6.5: #########1 | 92%
python 3.6.5: #########1 | 92%
python 3.6.5: #########2 | 92%
python 3.6.5: #########2 | 93%
python 3.6.5: #########2 | 93%
python 3.6.5: #########3 | 93%
python 3.6.5: #########3 | 93%
python 3.6.5: #########3 | 94%
python 3.6.5: #########4 | 94%
python 3.6.5: #########4 | 94%
python 3.6.5: #########4 | 95%
python 3.6.5: #########4 | 95%
python 3.6.5: #########5 | 95%
python 3.6.5: #########5 | 95%
python 3.6.5: #########5 | 96%
python 3.6.5: #########6 | 96%
python 3.6.5: #########6 | 96%
python 3.6.5: #########6 | 97%
python 3.6.5: #########6 | 97%
python 3.6.5: #########7 | 97%
python 3.6.5: #########7 | 97%
python 3.6.5: #########7 | 98%
python 3.6.5: #########7 | 98%
python 3.6.5: #########8 | 98%
python 3.6.5: #########8 | 98%
python 3.6.5: #########8 | 99%
python 3.6.5: #########8 | 99%
python 3.6.5: #########8 | 99%
python 3.6.5: #########9 | 99%
python 3.6.5: #########9 | 99%
python 3.6.5: #########9 | 100%
python 3.6.5: #########9 | 100%
python 3.6.5: #########9 | 100%
python 3.6.5: #########9 | 100%
python 3.6.5: ########## | 100%

pyopenssl 17.5.0: | 0%
pyopenssl 17.5.0: ########5 | 86%
pyopenssl 17.5.0: ########## | 100%

setuptools 39.0.1: | 0%
setuptools 39.0.1: #######5 | 75%
setuptools 39.0.1: ########9 | 89%
setuptools 39.0.1: ########## | 100%

ca-certificates 2018.03.07: | 0%
ca-certificates 2018.03.07: #######6 | 77%
ca-certificates 2018.03.07: ########## | 100%

wincertstore 0.2: | 0%
wincertstore 0.2: ########## | 100%

wheel 0.31.0: | 0%
wheel 0.31.0: ########5 | 86%
wheel 0.31.0: ########## | 100%

vc 14: | 0%
vc 14: ########## | 100%

@Bezier89
Copy link
Contributor Author

PR: #7146

@kalefranz
Copy link
Contributor

Can we elaborate on why we prefer progress bars and other UI elements (e.g. spinners) going to stdout? Just to make sure we’re all on the same page.

In general, we should take this opportunity to distinguish what we send to stdout vs what we send to stderr, and under what configuration conditions those change (e.g. json, quiet, or verbose flags).

@Bezier89
Copy link
Contributor Author

@kalefranz As a rule of thumb, I would say that normal, expected things should go to stdout, and unexpected (not necessarily leading to a crash, but at least somehow interesting/noteworthy) things should go to stderr. Also that the number of lines written to stderr should be quite small, or else it makes finding actual errors cumbersome when they're preceded by hundreds of lines of progress bars!

@Bezier89
Copy link
Contributor Author

@kalefranz Are there any objections to merging #7146? Seems like a simple fix.

@kalefranz kalefranz added type::bug describes erroneous operation, use severity::* to classify the type source::community catch-all for issues filed by community members severity::3 major; broken functionality with a workaround labels Apr 12, 2018
@kalefranz kalefranz changed the title Progress bar uses stderr instead of stdout progress bar uses stderr instead of stdout Apr 12, 2018
@kalefranz kalefranz added this to the 4.6.0 milestone Apr 12, 2018
@github-actions
Copy link

Hi there, thank you for your contribution to Conda!

This issue has been automatically locked since it has not had recent activity after it was closed.

Please open a new issue if needed.

@github-actions github-actions bot added the locked [bot] locked due to inactivity label Sep 13, 2021
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 13, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
locked [bot] locked due to inactivity severity::3 major; broken functionality with a workaround source::community catch-all for issues filed by community members type::bug describes erroneous operation, use severity::* to classify the type
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants