FS#53505 - [diffoscope] Missing optdepend on python-progressbar
Attached to Project:
Community Packages
Opened by Luke Shumaker (lukeshu) - Thursday, 30 March 2017, 20:44 GMT
Last edited by Levente Polyak (anthraxx) - Thursday, 05 October 2017, 13:16 GMT
Opened by Luke Shumaker (lukeshu) - Thursday, 30 March 2017, 20:44 GMT
Last edited by Levente Polyak (anthraxx) - Thursday, 05 October 2017, 13:16 GMT
|
Details
Description:
diffoscope's "--progressbar" option requires pyton-progressbar. It only imports the "progressbar" module when the flag is passed, as to not require it as a full dependency. Additional info: * package version: diffoscope-80-1-x86_64 Steps to reproduce: Install diffoscope, but don't have python-progressbar installed. Run diffoscope with the "--progress" flag. Observe a crash based around "ModuleNotFoundError: No module named 'progressbar'". |
This task depends upon
Closed by Levente Polyak (anthraxx)
Thursday, 05 October 2017, 13:16 GMT
Reason for closing: Fixed
Additional comments about closing: 87-1
Thursday, 05 October 2017, 13:16 GMT
Reason for closing: Fixed
Additional comments about closing: 87-1
(tmp-dcdf2e6fa6384ab) [sangy@LykOS tmp-dcdf2e6fa6384ab]$ diffoscope
Traceback (most recent call last):
File "/home/sangy/.virtualenvs/tmp-dcdf2e6fa6384ab/lib/python3.6/site-packages/diffoscope/main.py", line 393, in main
log_handler = ProgressManager().setup(parsed_args)
File "/home/sangy/.virtualenvs/tmp-dcdf2e6fa6384ab/lib/python3.6/site-packages/diffoscope/progress.py", line 75, in setup
bar = ProgressBar()
File "/home/sangy/.virtualenvs/tmp-dcdf2e6fa6384ab/lib/python3.6/site-packages/diffoscope/progress.py", line 191, in __init__
class Message(progressbar.Widget):
AttributeError: module 'progressbar' has no attribute 'Widget'
It seems that the cause is that diffoscope assumes this version exists: https://github.com/niltonvolpato/python-progressbar (identified in pip as progressbar, and exposes this class https://github.com/niltonvolpato/python-progressbar/blob/master/progressbar/widgets.py#L41)
whlie we ship this one: https://github.com/WoLpH/python-progressbar (identified in pypi as progressbar2, which apparently nuked the Widget class on this commit: https://github.com/WoLpH/python-progressbar/commit/101a30a56d2f6bfbda1b310089c498885d5367e1)
I'm not sure if this would require its own ticket.
https://anonscm.debian.org/git/reproducible/diffoscope.git/commit/?id=8e1761586fef81ececa156c98f677d044f09a9aa
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=873157
This still doesn't fix this optdepends bug, but does take care of the incompatible dependency.