Community Packages

Please read this before reporting a bug:
http://wiki.archlinux.org/index.php/Reporting_Bug_Guidelines

Do NOT report bugs when a package is just outdated, or it is in Unsupported. Use the 'flag out of date' link on the package page, or the Mailing List.

REPEAT: Do NOT report bugs for outdated packages!
Tasklist

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
Task Type Bug Report
Category Packages
Status Closed
Assigned To Levente Polyak (anthraxx)
Architecture All
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 1
Private No

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
Comment by Santiago Torres (sangy) - Friday, 25 August 2017, 01:17 GMT
It also seems that the version of python-progressbar that we are shipping as of now (3.34) is *not* compatible with the current version of diffoscope (85) due to some classes being renamed:


(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.
Comment by Santiago Torres (sangy) - Friday, 25 August 2017, 16:25 GMT
As of today, diffoscope now supports both versions of python-progressbar:

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.

Loading...