-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
progressbar: fix regression with hidden bars #1142
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
progressbar: fix regression with hidden bars #1142
Conversation
|
When/where was it removed? Why was it removed? |
|
It was removed somewhere between versions 6.7 and 7.0, as it works in 6.7 but doesn't in 7.0. It appears to not have been removed on purpose, as I'd also argue that even if it was removed on purpose, it should still be kept, since:
|
|
Most peculiar observation: This + a test for it were that contributor's only commits to the repository, and that during October of last year, so this seems like a well-intentioned but ultimately wrong Hacktoberfest drive-by. |
sirosen
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree with the rationale for changing the behavior back to match the docs.
However, I'd really appreciate a second reviewer stepping in and agreeing before we merge. It's a behavior change between 7.0 and 7.1 . I think it's fair to call it a bugfix.
|
The PR was #863. |
|
Looking over the discussion again, it's less obvious that this should move forward as stated. One way or another, the docs don't currently match the behavior. The original change proposed in #863, writing to stderr instead of stdout, seems best. |
f56cfa8 to
ad23baf
Compare
|
I think restoring the behavior makes sense, this PR seems fine. I think the stderr default also makes sense, but I'm hesitant to change it at this point, especially since I'm trying to stop making changes to our progress bar and point users to tqdm for anything beyond basic tasks. |
The documentation of the progress bar states that the progress bar will output only the label of the bar if it is outputting to a file that is not a tty. However, this was broken a few versions ago, without the documentation being adjusted, and even a test added. Restore this behaviour so we follow the documentation again, and adjust the test to match. Fixes pallets#1138.
ad23baf to
e745081
Compare
The documentation of the progress bar states that the progress bar will output only the label of the bar if it is outputting to a file that is not a tty. However, this was broken a few versions ago, without the documentation being adjusted, and even a test added.
Restore this behaviour so we follow the documentation again, and adjust the test to match. Fixes #1138.