breezy fails to build with Python 3.10.0a1.
breezy/_static_tuple_c.c: In function â€˜StaticTuple_Internâ€™:
breezy/_static_tuple_c.c:100:21: error: lvalue required as left operand of assignment
100 | Py_REFCNT(self) -= 1;
breezy/_static_tuple_c.c: In function â€˜StaticTuple_deallocâ€™:
breezy/_static_tuple_c.c:119:25: error: lvalue required as left operand of assignment
119 | Py_REFCNT(self) = 2;
Cannot build extension "breezy._static_tuple_c".
Use "build_ext --allow-python-fallback" to use slower python implementations instead.
error: command '/usr/bin/gcc' failed with exit code 1
For the build logs, see:
For all our attempts to build breezy 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.
Since Py_REFCNT() is changed to the inline static function, Py_REFCNT(obj) = new_refcnt must be replaced with Py_SET_REFCNT(obj, new_refcnt): see Py_SET_REFCNT() (available since Python 3.9). For backward compatibility, this macro can be used:
#if PY_VERSION_HEX < 0x030900A4
# define Py_SET_REFCNT(obj, refcnt) ((Py_REFCNT(obj) = (refcnt)), (void)0)
For the record, this is **not** fixed in breezy 3.1.0:
[breezy (3.1.0)]$ rg Py_REFCNT breezy-3.1.0
100: Py_REFCNT(self) -= 1;
119: Py_REFCNT(self) = 2;
I reported the issue to breezy upstream: https://bugs.launchpad.net/brz/+bug/1904868
My fix got merged into the 3.1 branch: https://bazaar.launchpad.net/~brz/brz/3.1/revision/7647
Thank you for the patch Victor. I can confirm that breezy builds alright in our Copr: https://copr.fedorainfracloud.org/coprs/g/python/python3.10/build/1776306/