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 <tornaria@cmat.edu.uy>
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. |
|
@dimpase or @embray do yall have a broad idea of what changes still need to be made (/ areas to focus on) to make this pass tests? Perhaps it's porting everything to GAP 4.12/4.13 APIs. I was planning on using gappy for a personal research project of mine, so I'd be willing to put in some work on this. But I don't know much about the status :) |
|
the project isn't active now. I am busy, and @embray even moreso. |
|
Still do really want to get back to this--the more time passes the more it gets harder to keep up. The first prototype of gappy was working quite well actually, and I think GAP has had some API improvements that will make some parts cleaner. One day I hope to have time 🙃 I might just take it up again for a few hours next time I'm feeling listless. |
|
maybe one should make a radical pivot from Cython to pybind11 or nanobind here. |
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.