[Bug 2056361] [NEW] [SRU] python3-qrencode fails with SystemError about PY_SSIZE_T_CLEAN macro
Launchpad Bug Tracker
2056361 at bugs.launchpad.net
Wed Mar 13 11:22:14 UTC 2024
You have been subscribed to a public bug by Sudip Mukherjee (sudipmuk):
[ Impact ]
python3-qrencode is completely unusable as it will crash with the
following error whenever any user tries to use to generate a QR code:
File "/usr/lib/python3/dist-packages/qrencode/__init__.py", line 47, in encode
version, size, data = _encode(data, version, level, hint, True)
SystemError: PY_SSIZE_T_CLEAN macro must be defined for '#' formats
[ Test Plan ]
Add the following content in a python file:
import qrencode
(version, size, im) = qrencode.encode("This is working")
im.show()
execute the python script. With the fixed package it will display the QR
code.
[ Where problems could occur ]
It is only defining 'PY_SSIZE_T_CLEAN' before including Python.h as is
suggested by upstream Python docs. There might be some adverse affect
for this but the package is already unusable.
[ Other Info ]
The same fix from Debian is in Mantic.
Noble is also affected but I can not mark the bug status as confirmed. The NMU fix was lost with the update to 1.2-6. But I have now done a QA upload in Debian with the fix and also added an autopkgtest which has the same python script as the test plan. So, when 1.2-7 syncs, Noble will be fixed.
[ Original Bug Description ]
Python3 module qrencode does not allow generating QR codes using
function encode().
The attached very simple script dies as follows:
$ ./python3-qrencode.py
Traceback (most recent call last):
File "/home/arrigo/temp/./python3-qrencode.py", line 5, in <module>
qrencode.encode("Hello world")
File "/usr/lib/python3/dist-packages/qrencode/__init__.py", line 47, in encode
version, size, data = _encode(data, version, level, hint, True)
SystemError: PY_SSIZE_T_CLEAN macro must be defined for '#' formats
Package: python3-qrencode version 1.2-5build6, architecture amd64 on
Ubuntu 22.04
** Affects: python-qrencode (Ubuntu)
Importance: Undecided
Status: Fix Released
** Affects: python-qrencode (Ubuntu Jammy)
Importance: Undecided
Status: Confirmed
** Affects: python-qrencode (Debian)
Importance: Unknown
Status: Fix Released
--
[SRU] python3-qrencode fails with SystemError about PY_SSIZE_T_CLEAN macro
https://bugs.launchpad.net/bugs/2056361
You received this bug notification because you are a member of Ubuntu Sponsors, which is subscribed to the bug report.
More information about the Ubuntu-sponsors
mailing list