python-alsa fails to build with Python 3.10.0a3.
In file included from /usr/include/python3.10/tupleobject.h:39,
pyalsa/alsahcontrol.c: In function â€˜element_callbackâ€™:
/usr/include/python3.10/cpython/tupleobject.h:26:36: error: void value not ignored as it ought to be
26 | #define PyTuple_SET_ITEM(op, i, v) ((void)(_PyTuple_CAST(op)->ob_item[i] = v))
pyalsa/alsahcontrol.c:1546:21: note: in expansion of macro â€˜PyTuple_SET_ITEMâ€™
1546 | if (PyTuple_SET_ITEM(t, 0, (PyObject *)pyhelem))
error: command '/usr/bin/gcc' failed with exit code 1
bpo-30459: PyList_SET_ITEM(), PyTuple_SET_ITEM() and PyCell_SET() macros can no longer be used as l-value or r-value. For example, x = PyList_SET_ITEM(a, b, c) and PyList_SET_ITEM(a, b, c) = x now fail with a compiler error. It prevents bugs like if (PyList_SET_ITEM (a, b, c) < 0) ... test. Patch by Zackery Spytz and Victor Stinner.
For the build logs, see:
For all our attempts to build python-alsa with Python 3.10, see:
Testing and mass rebuild of packages is happening in copr. You can follow these instructions to test locally in mock if your package builds with Python 3.10:
Let us know here if you have any questions.
Python 3.10 will be included in Fedora 35. To make that update smoother, we're building Fedora packages with early pre-releases of Python 3.10.
A build failure prevents us from testing all dependent packages (transitive [Build]Requires), so if this package is required a lot, it's important for us to get it fixed soon.
We'd appreciate help from the people who know this package best, but if you don't want to work on this now, let us know so we can try to work around it on our side.
Apply also commit a64a6cc703d08db5c223a16bf812a569534ba464 (alsaseq: fix constant objects in Python)
The correct patch subject mentioned in comment#1 is "alsaseq: fix constant objects in Python 3", sorry.
> Apply also commit a64a6cc703d08db5c223a16bf812a569534ba464 (alsaseq: fix constant objects in Python)
This change looks unrelated, whereas the following change fix this BZ:
This fix is already in the package:
The package now builds succesfully on Python 3.10:
I close again the BZ. Thanks for the fix!