Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Incompatibility with Python 3.12 #246

Closed
encukou opened this issue Jun 30, 2023 · 2 comments · Fixed by #254
Closed

Incompatibility with Python 3.12 #246

encukou opened this issue Jun 30, 2023 · 2 comments · Fixed by #254

Comments

@encukou
Copy link

encukou commented Jun 30, 2023

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.)

(edit) See also: python/cpython#101292

@malb
Copy link
Collaborator

malb commented Jul 1, 2023

Thank you for flagging this! I don't think we need every last drop of performance here. I anyone would prepare a PR, that'd be fab :)

@malb
Copy link
Collaborator

malb commented Sep 4, 2023

See sagemath/sage#36181

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants