Package: python3-amqplib
Version: 1.0.2-4
Severity: serious
Justification: 5p
X-Debbugs-Cc: [email protected]
The `python3-amqplib/1.0.2-4` package build is broken: it's missing a magical
2to3 step.
Using it leads to that kind of traceback:
```
File "/usr/lib/python3/dist-packages/amqplib/client_0_8/connection.py", line
96, in __init__
login_response.write_table({'LOGIN': userid, 'PASSWORD': password})
File "/usr/lib/python3/dist-packages/amqplib/client_0_8/serialization.py",
line 370, in write_table
table_data.write_shortstr(k)
File "/usr/lib/python3/dist-packages/amqplib/client_0_8/serialization.py",
line 338, in write_shortstr
if isinstance(s, unicode):
^^^^^^^
NameError: name 'unicode' is not defined
```
A very quick test to check the Python 3 compatibility is the following:
$ grep 'isinstance.*unicode'
/usr/lib/python3/dist-packages/amqplib/client_0_8/serialization.py
if isinstance(s, unicode):
if isinstance(s, unicode):
if isinstance(v, unicode):
Those `unicode` invokations should have been converted to `str` during the
build process, which worked beforehand, but has been broken. I've detected this
bug on Ubuntu, and it worked correctly at the time of Noble, and has only been
broken in Oracular.
I did not investigate much further, but a local manual build also produces a
broken binary package. From what I've seen in the launchpad build logs,
previous version were installing python3-lib2to3 during the build, and this is
not the case anymore. I guess it would be similar in Debian's infrastructure.
A quick workaround for anyone affected is to run the following:
sudo 2to3 -w /usr/lib/python3/dist-packages/amqplib/client_0_8/*
-- System Information:
Debian Release: trixie/sid
APT prefers oracular
APT policy: (500, 'oracular'), (400, 'oracular-proposed'), (200,
'noble-updates'), (200, 'noble'), (200, 'jammy-updates'), (200, 'jammy')
Architecture: amd64 (x86_64)
Kernel: Linux 6.8.0-11-generic (SMP w/12 CPU threads; PREEMPT)
Kernel taint flags: TAINT_PROPRIETARY_MODULE, TAINT_WARN, TAINT_OOT_MODULE
Locale: LANG=fr_FR.UTF-8, LC_CTYPE=fr_FR.UTF-8 (charmap=UTF-8), LANGUAGE not set
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled
Versions of packages python3-amqplib depends on:
ii python3 3.12.3-0ubuntu1
python3-amqplib recommends no packages.
Versions of packages python3-amqplib suggests:
pn python-amqplib-doc <none>
-- no debconf information