Public bug reported:
The `python3-amqplib/1.0.2-4` package build is broken on Oracular: 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 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):
This should not return any result, but on Oracular I get the output
above. This is not happening on Noble and before.
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.
A quick workaround for anyone affected is to run the following:
sudo 2to3 -w /usr/lib/python3/dist-packages/amqplib/client_0_8/*
ProblemType: Bug
DistroRelease: Ubuntu 24.10
Package: python3-amqplib 1.0.2-4 [modified:
usr/lib/python3/dist-packages/amqplib/client_0_8/connection.py
usr/lib/python3/dist-packages/amqplib/client_0_8/method_framing.py
usr/lib/python3/dist-packages/amqplib/client_0_8/serialization.py]
ProcVersionSignature: Ubuntu 6.8.0-11.11-generic 6.8.0-rc4
Uname: Linux 6.8.0-11-generic x86_64
NonfreeKernelModules: zfs
ApportVersion: 2.28.1-0ubuntu4
Architecture: amd64
CasperMD5CheckResult: unknown
CurrentDesktop: sway
Date: Tue Jul 30 16:15:06 2024
Dependencies:
InstallationDate: Installed on 2023-08-02 (363 days ago)
InstallationMedia: Ubuntu 23.04 "Lunar Lobster" - Release amd64 (20230418)
PackageArchitecture: all
ProcEnviron:
LANG=fr_FR.UTF-8
PATH=(custom, no user)
SHELL=/bin/zsh
TERM=alacritty
XDG_RUNTIME_DIR=<set>
SourcePackage: python-amqplib
UpgradeStatus: Upgraded to oracular on 2024-06-12 (48 days ago)
** Affects: python-amqplib (Ubuntu)
Importance: Undecided
Status: New
** Tags: amd64 apport-bug oracular rls-incoming-oracular wayland-session
** Description changed:
The `python3-amqplib/1.0.2-4` package build is broken on Oracular: 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):
- ^^^^^^^
+ 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 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):
+ if isinstance(s, unicode):
+ if isinstance(s, unicode):
+ if isinstance(v, unicode):
This should not return any result, but on Oracular I get the output
above. This is not happening on Noble and before.
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.
+
+ A quick workaround for anyone affected is to run the following:
+ sudo 2to3 -w /usr/lib/python3/dist-packages/amqplib/client_0_8/*
ProblemType: Bug
DistroRelease: Ubuntu 24.10
Package: python3-amqplib 1.0.2-4 [modified:
usr/lib/python3/dist-packages/amqplib/client_0_8/connection.py
usr/lib/python3/dist-packages/amqplib/client_0_8/method_framing.py
usr/lib/python3/dist-packages/amqplib/client_0_8/serialization.py]
ProcVersionSignature: Ubuntu 6.8.0-11.11-generic 6.8.0-rc4
Uname: Linux 6.8.0-11-generic x86_64
NonfreeKernelModules: zfs
ApportVersion: 2.28.1-0ubuntu4
Architecture: amd64
CasperMD5CheckResult: unknown
CurrentDesktop: sway
Date: Tue Jul 30 16:15:06 2024
Dependencies:
-
+
InstallationDate: Installed on 2023-08-02 (363 days ago)
InstallationMedia: Ubuntu 23.04 "Lunar Lobster" - Release amd64 (20230418)
PackageArchitecture: all
ProcEnviron:
- LANG=fr_FR.UTF-8
- PATH=(custom, no user)
- SHELL=/bin/zsh
- TERM=alacritty
- XDG_RUNTIME_DIR=<set>
+ LANG=fr_FR.UTF-8
+ PATH=(custom, no user)
+ SHELL=/bin/zsh
+ TERM=alacritty
+ XDG_RUNTIME_DIR=<set>
SourcePackage: python-amqplib
UpgradeStatus: Upgraded to oracular on 2024-06-12 (48 days ago)
** Tags added: rls-incoming-oracular
--
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/2075183
Title:
Produced binary package for Oracular is Python2 only
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/python-amqplib/+bug/2075183/+subscriptions
--
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs