Package: calibre
Version: 5.12.0+dfsg-1+deb11u1
Severity: grave
Tags: a11y patch
Justification: renders package unusable
Dear Maintainer,
The version used in debian stable for Calibre does not seem to work.
It creates the following problem:
Traceback (most recent call last):
File "/usr/bin/calibre", line 20, in <module>
sys.exit(calibre())
File "/usr/lib/calibre/calibre/gui_launch.py", line 73, in calibre
main(args)
File "/usr/lib/calibre/calibre/gui2/main.py", line 516, in main
run_main(app, opts, args, gui_debug, si)
File "/usr/lib/calibre/calibre/gui2/main.py", line 523, in run_main
return run_gui(opts, args, app, gui_debug=gui_debug)
File "/usr/lib/calibre/calibre/gui2/main.py", line 388, in run_gui
run_gui_(opts, args, app, gui_debug)
File "/usr/lib/calibre/calibre/gui2/main.py", line 398, in run_gui_
from calibre.gui2.ui import Main
File "/usr/lib/calibre/calibre/gui2/ui.py", line 32, in <module>
from calibre.customize.ui import available_store_plugins, interface_actions
File "/usr/lib/calibre/calibre/customize/ui.py", line 18, in <module>
from calibre.customize.builtins import plugins as builtin_plugins
File "/usr/lib/calibre/calibre/customize/builtins.py", line 752, in <module>
from calibre.devices.smart_device_app.driver import SMART_DEVICE_APP
File "/usr/lib/calibre/calibre/devices/smart_device_app/driver.py", line
2044, in <module>
from zeroconf import (BadTypeInNameException, _HAS_A_TO_Z,
ImportError: cannot import name '_HAS_A_TO_Z' from 'zeroconf'
(/usr/local/lib/python3.9/dist-packages/zeroconf/__init__.py)
I found a patch from gentoo to fix the problem:
--- driver.ori.py 2022-01-05 16:22:28.978735392 +0100
+++ driver.py 2022-01-05 16:23:00.627144736 +0100
@@ -2041,12 +2041,6 @@
# Copied from https://github.com/jstasiak/python-zeroconf version 0.28.1
-from zeroconf import (BadTypeInNameException, _HAS_A_TO_Z,
- _HAS_ONLY_A_TO_Z_NUM_HYPHEN_UNDERSCORE,
- _HAS_ASCII_CONTROL_CHARS,
- _HAS_ONLY_A_TO_Z_NUM_HYPHEN)
-
-
def service_type_name(type_: str, *, allow_underscores: bool = False) -> str:
"""
Validate a fully qualified service name, instance or subtype. [rfc6763]
@@ -2087,6 +2081,10 @@
:param type_: Type, SubType or service name to validate
:return: fully qualified service name (eg: _http._tcp.local.)
"""
+ from zeroconf import (BadTypeInNameException, _HAS_A_TO_Z,
+ _HAS_ONLY_A_TO_Z_NUM_HYPHEN_UNDERSCORE,
+ _HAS_ASCII_CONTROL_CHARS,
+ _HAS_ONLY_A_TO_Z_NUM_HYPHEN)
if not (type_.endswith('._tcp.local.') or type_.endswith('._udp.local.')):
raise BadTypeInNameException("Type '%s' must end with '._tcp.local.'
or '._udp.local.'" % type_)
Best regards
-- System Information:
Debian Release: 11.2
APT prefers stable-updates
APT policy: (500, 'stable-updates'), (500, 'stable-security'), (500, 'stable')
Architecture: amd64 (x86_64)
Kernel: Linux 5.10.0-10-amd64 (SMP w/12 CPU threads)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8),
LANGUAGE=en_US:en
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled
Versions of packages calibre depends on:
ii calibre-bin 5.12.0+dfsg-1+deb11u1
ii dpkg 1.20.9
ii fonts-liberation2 2.1.3-1
ii imagemagick 8:6.9.11.60+dfsg-1.3
ii imagemagick-6.q16 [imagemagick] 8:6.9.11.60+dfsg-1.3
ii libjpeg-turbo-progs 1:2.0.6-4
ii libjxr-tools 1.1-6+b1
ii optipng 0.7.7-1+b1
ii poppler-utils 20.09.0-3.1
ii python3 3.9.2-3
ii python3-apsw 3.34.0-r1-1
ii python3-bs4 4.9.3-1
ii python3-chardet 4.0.0-1
ii python3-chm 0.8.6-2+b3
ii python3-css-parser 1.0.6-1
ii python3-cssselect 1.1.0+ds-1
ii python3-cssutils 1.0.2-3
ii python3-dateutil 2.8.1-6
ii python3-dbus 1.2.16-5
ii python3-feedparser 5.2.1-3
ii python3-html2text 2020.1.16-1
ii python3-html5-parser 0.4.9-3+b3
ii python3-html5lib 1.1-3
ii python3-lxml 4.6.3+dfsg-0.1
ii python3-markdown 3.3.4-1
ii python3-mechanize 1:0.4.5-2
ii python3-msgpack 1.0.0-6+b1
ii python3-netifaces 0.10.9-0.2+b3
ii python3-pil 8.1.2+dfsg-0.3
ii python3-pkg-resources 52.0.0-4
ii python3-py7zr 0.11.3+dfsg-1
ii python3-pygments 2.7.1+dfsg-2.1
ii python3-pyparsing 2.4.7-1
ii python3-pyqt5 5.15.2+dfsg-3
ii python3-pyqt5.qtsvg 5.15.2+dfsg-3
ii python3-pyqt5.qtwebengine 5.15.2-2
ii python3-pyqt5.sip 12.8.1-1+b2
ii python3-regex 0.1.20201113-1
ii python3-routes 2.5.1-1
ii python3-speechd 0.10.2-2+deb11u1
ii python3-zeroconf 0.26.1-1
ii python3.9 3.9.2-1
ii xdg-utils 1.1.3-4.1
Versions of packages calibre recommends:
ii python3-dnspython 2.0.0-1
ii udisks2 2.9.2-2+deb11u1
Versions of packages calibre suggests:
ii python3-openssl 20.0.1-1
pn python3-unrardll <none>
-- no debconf information