In Python 3.12, PyUnicdeo_AS_UNICODE has been removed: https://peps.python.org/pep-0623/#python-3-12 It's still used in https://github.com/urwid/urwid/blob/f7d2f2f6a8a519bd64ebbe1895e5c6b5948199f3/source/str_util.c Attempting to build urwid will give errors of this form: gcc ... -fPIC -I/usr/include/python3.12 -c source/str_util.c -o build/temp.linux-x86_64-cpython-312/source/str_util.o source/str_util.c: In function ‘Py_IsWideChar’: source/str_util.c:484:16: warning: implicit declaration of function ‘PyUnicode_AS_UNICODE’; did you mean ‘PyUnicode_AsUCS4’? [-Wimplicit-function-declaration] 484 | ustr = PyUnicode_AS_UNICODE(text); | ^~~~~~~~~~~~~~~~~~~~ | PyUnicode_AsUCS4 source/str_util.c:484:14: warning: assignment to ‘Py_UNICODE *’ {aka ‘int *’} from ‘int’ makes pointer from integer without a cast [-Wint-conversion] 484 | ustr = PyUnicode_AS_UNICODE(text); | ^ source/str_util.c: In function ‘Py_CalcWidth’: source/str_util.c:663:14: warning: assignment to ‘Py_UNICODE *’ {aka ‘int *’} from ‘int’ makes pointer from integer without a cast [-Wint-conversion] 663 | ustr = PyUnicode_AS_UNICODE(text); | ^ source/str_util.c: In function ‘Py_CalcTextPos’: source/str_util.c:749:14: warning: assignment to ‘Py_UNICODE *’ {aka ‘int *’} from ‘int’ makes pointer from integer without a cast [-Wint-conversion] 749 | ustr = PyUnicode_AS_UNICODE(text); | ^ Reproducible: Always Affects: python-urwid-2.1.2-9.fc39
This bug appears to have been reported against 'rawhide' during the Fedora Linux 39 development cycle. Changing version to 39.
A fix is now available (and looks simple enough to carry the patch): https://github.com/urwid/urwid/pull/598/files
https://src.fedoraproject.org/rpms/python-urwid/pull-request/3#