Skip to content
Snippets Groups Projects
Commit 828a33ab authored by Vekhir's avatar Vekhir
Browse files

Update to progressbar >= 3.0

When `progressbar` was forked and rewritten, several API changes were made. Those were only partially adapted here in diffoscope - due to lack of sufficient tooling to detect those differences at the time, as known compile errors were fixed.
Hence, this part of the code base didn't work for over 6 years - the updates introduced here are still compatible with the release of the rewrite as v3.0. Going further back likely isn't a concern anymore.
The two relevant commits in progressbar are https://github.com/wolph/python-progressbar/commit/12df6aec2b87f409bbe4dc1b09e82b048e3ff10d and https://github.com/wolph/python-progressbar/commit/a1fc83090e870d4136f93654cf54b581f0e0b882, which are included in 3.0.
One notable change is the removal of `self.bar.start()` in the setup. The change works, as the progressbar calls `start` automatically if there hasn't been one defined. Starting the progressbar within the setup, however, is problematic because the starting time is set there. At setup time, this time is in localtime - only later is it set to UTC yielding wrong time differences which can even be negative. Letting progressbar start the timer is therefore both more convenient and correct.
parent f1822463
No related branches found
No related tags found
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment