Produced binary package for Oracular is Python2 only

Bug #2075183 reported by Skia
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
python-amqplib (Debian)
New
Unknown
python-amqplib (Ubuntu)
New
Undecided
Unassigned

Bug Description

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)

Revision history for this message
Skia (hyask) wrote :
description: updated
tags: added: rls-incoming-oracular
tags: added: rls-oo-incoming
removed: rls-incoming-oracular
tags: added: cuqa-manual-testing
Changed in python-amqplib (Debian):
status: Unknown → New
tags: added: foundations-todo
removed: rls-oo-incoming
Revision history for this message
Skia (hyask) wrote :

Discussed with the Debian side, and this package will likely get dropped. Could somebody please set that as WontFix and update the tags accordingly?

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.