[Bug 2056361] Re: [SRU] python3-qrencode fails with SystemError about PY_SSIZE_T_CLEAN macro
Dave Jones
2056361 at bugs.launchpad.net
Wed Mar 27 11:06:17 UTC 2024
Patch looks good, and the test case is well written; sponsoring
--
You received this bug notification because you are a member of Ubuntu
Sponsors, which is subscribed to the bug report.
https://bugs.launchpad.net/bugs/2056361
Title:
[SRU] python3-qrencode fails with SystemError about PY_SSIZE_T_CLEAN
macro
Status in python-qrencode package in Ubuntu:
Fix Released
Status in python-qrencode source package in Jammy:
Confirmed
Status in python-qrencode package in Debian:
Fix Released
Bug description:
[ 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
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/python-qrencode/+bug/2056361/+subscriptions
More information about the Ubuntu-sponsors
mailing list