Project

Profile

Help

Bug #6561

open

SaxonC Support for Python 3.13

Added by O'Neil Delpratt 3 months ago. Updated 6 days ago.

Status:
New
Priority:
Normal
Category:
Python Build
Start date:
2024-10-17
Due date:
% Done:

0%

Estimated time:
Applies to branch:
12
Fix Committed on Branch:
Fixed in Maintenance Release:
Found in version:
12.5
Fixed in version:
SaxonC Languages:
Python
SaxonC Platforms:
All
SaxonC Architecture:

Description

User requested support for Python 3.13 on the forum post: https://saxonica.plan.io/boards/2/topics/9748?pn=1


Related issues

Has duplicate SaxonC - Feature #6650: SaxonC-HE wheels for Python 3.13NewMatt Patterson2025-01-16

Actions
Actions #1

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

Actions #2

Updated by O'Neil Delpratt about 2 months ago

  • Assignee changed from O'Neil Delpratt to Matt Patterson
Actions #3

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.

Actions #4

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.

Actions #5

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?

Actions #6

Updated by O'Neil Delpratt 6 days ago

  • Has duplicate Feature #6650: SaxonC-HE wheels for Python 3.13 added
Actions #7

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

Also available in: Atom PDF