Python 3.12 changes the internal representation of int objects (to speed up common cases). Usage of Py_SIZE and ob_digit in gmp/pylong.pyx will fail.
The supported way of extracting the value of integers (if they don't fit in a C long long) is the Python method to_bytes, and there's from_bytes to go back. (If this is too slow for fpylll, please chime in in the discussion.)
Python 3.12 changes the internal representation of
int
objects (to speed up common cases). Usage ofPy_SIZE
andob_digit
ingmp/pylong.pyx
will fail.The supported way of extracting the value of integers (if they don't fit in a C
long long
) is the Python method to_bytes, and there'sfrom_bytes
to go back. (If this is too slow for fpylll, please chime in in the discussion.)(edit) See also: https://github.com/python/cpython/pull/101292