-
Notifications
You must be signed in to change notification settings - Fork 5
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
WIP - port to Cython 3, and GAP 4.12 #24
base: master
Are you sure you want to change the base?
Conversation
porting to Pyhton 3.12 has to be done. Easiest would be to use the recent code by @tornaria in sage/fpylll/cypari2. |
The layout for python integers changed in python 3.12. We add a module `gappy.cpython.pycore_long` which copies the new (internal) api of PyLong from python 3.12. We also implement fallback version of these functions suitable for python pre-3.12. Note the files implementing the `pycore_long` module (`pycore_long.pxd` and `pycore_long.h`) are shared with SageMath, fpylll and cypari2. cf. sagemath/sage, commit dc71bd03c4db0e50cf85b8b3d1cdd4c44b9bd385 Author: Gonzalo Tornaría <[email protected]> Date: Mon Oct 2 13:20:32 2023 -0300 py312: changes in PyLong internals The layout for python integers changed in python 3.12. We add a module `sage.cpython.pycore_long` which copies the new (internal) api of PyLong from python 3.12. We also implement fallback version of these functions suitable for python pre-3.12. Note the files implementing the `pycore_long` module (`pycore_long.pxd` and `pycore_long.h`) are shared with fpylll and cypari2.
Did you see #23 ? It made some fixes that might be relevant here too. |
yeah, some of #23 repeat what I did, some of it makes no sense. The output thing needs to use the new GAP kernel function, CALL_WITH_STREAM added in 4.12, see gap-system/gap#2839 It's on my todo list. |
Will definitely have a look soon. Just need to get GAP itself set up again |
by the way, in Sage we are getting bitten by the absence of a stateless way to convert Python objects to GAP, to call GAP functions. Basically one must declare most if not all the Obj created in Sage volatile, otherwise in Pyhton 3.12 |
Hi @saraedum - could you explain what's wrong in
As far as I can see, conda-forge does have GAP-4.13.0. |
These packages are not in the |
Why is that flag in the workflow file? |
This is the question for whoever put it there |
I'll see what happens if it's removed |
According to 3 years ago me "It's apparently required for caching to work properly" b2df390 Which makes a certain sense. But I don't know if we really need it. |
now the tests are running (some failing, as expected, due to incomplete porting) |
Would it still make sense to continue supporting GAP 4.10.x via preprocessor macros? Or has the community mostly moved beyond it? |
I don't think any non-obsolete distro has GAP 4.10. See https://repology.org/project/gap/versions |
Ok, just checking. I'm inclined to agree it's not worth the effort at this point, especially if we want to get a working release out. |
I propose to stick to gap 4.12 and 4.13, actually, due to incompatible API changes in libgap, compared to 4.11. |
an attempt to start port to Cython 3 and GAP 4.12 (4.13 hopefully then).
It builds, and import gap works.
Also, in needs work to add stream output, which got broken due to changed functionality in GAP.