Bug #6561
openSaxonC Support for Python 3.13
0%
Description
User requested support for Python 3.13 on the forum post: https://saxonica.plan.io/boards/2/topics/9748?pn=1
Related issues
Updated by O'Neil Delpratt 3 months ago
Looking at the error " '_PyLong_AsByteArray': function does not take 5 arguments" there is some discussion about these functions here: https://github.com/python/cpython/issues/111140
Updated by O'Neil Delpratt about 2 months ago
- Assignee changed from O'Neil Delpratt to Matt Patterson
Updated by Matt Patterson 30 days ago
This turns out to be because the version of Cython we're using in shipping versions (0.29.x in Saxon C 12.5) is not ABI compatible with Python 3.13.
Upgrading to Cython 3.0.11 will provide ABI compatibility with Python 3.8+, including 3.13.
Updated by Matt Patterson 30 days ago
We have been able to successfully upgrade the version of Cython we use, and the next maintenance release will be built using this, and so will be compatible with Python 3.8+, including 3.13.
Updated by Martin Honnen 17 days ago
It seems https://docs.python.org/3/whatsnew/3.13.html#free-threaded-cpython has some new feature "free threaded mode":
C-API extension modules need to be built specifically for the free-threaded build. Extensions that support running with the GIL disabled should use the Py_mod_gil slot. Extensions using single-phase init should use PyUnstable_Module_SetGIL() to indicate whether they support running with the GIL disabled. Importing C extensions that don’t use these mechanisms will cause the GIL to be enabled, unless the GIL was explicitly disabled with the PYTHON_GIL environment variable or the -X gil=0 option. pip 24.1 or newer is required to install packages with C extensions in the free-threaded build.
Are you also looking into making SaxonC compatible with that mode?
Updated by O'Neil Delpratt 6 days ago
- Has duplicate Feature #6650: SaxonC-HE wheels for Python 3.13 added
Updated by Yegor Yefremov 6 days ago
Have you also tried to build the library against Python 3.14? It is to be released in October. Hence, it will be good to solve the main issues beforehand.
Please register to edit this issue