From fc573ccfc425bc0312cc67f85dbde0e9ddfb50ae Mon Sep 17 00:00:00 2001 From: Zac Medico Date: Sun, 26 Oct 2025 18:31:06 -0700 Subject: [PATCH 1/2] Support Py_GIL_DISABLED Do not set py_limited_api when Py_GIL_DISABLED == 1, since it will be rejected as shown: File "/usr/lib/python3.14t/site-packages/setuptools/_distutils/cmd.py", line 135, in ensure_finalized self.finalize_options() ~~~~~~~~~~~~~~~~~~~~~^^ File "", line 82, in finalize_options File "/usr/lib/python3.14t/site-packages/setuptools/command/bdist_wheel.py", line 250, in finalize_options self._validate_py_limited_api() ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^ File "/usr/lib/python3.14t/site-packages/setuptools/command/bdist_wheel.py", line 285, in _validate_py_limited_api raise ValueError( ...<4 lines>... ) ValueError: `py_limited_api='cp314'` not supported. `Py_LIMITED_API` is currently incompatible with `Py_GIL_DISABLED`.See https://github.com/python/cpython/issues/111506. --- setup.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/setup.py b/setup.py index 61748fd..1b086ff 100644 --- a/setup.py +++ b/setup.py @@ -3,6 +3,7 @@ import re import platform import sys +import sysconfig from setuptools import find_packages, setup from setuptools.command.build_ext import build_ext @@ -76,7 +77,8 @@ def run(self): else: class BDistWheel(wheel.bdist_wheel.bdist_wheel): def finalize_options(self): - self.py_limited_api = "cp3{}".format(sys.version_info[1]) + if sysconfig.get_config_var("Py_GIL_DISABLED") != 1: + self.py_limited_api = "cp{}{}".format(*sys.version_info) wheel.bdist_wheel.bdist_wheel.finalize_options(self) cmdclass['bdist_wheel'] = BDistWheel From fdaa76b29e172a85cbec7aec07dcf88d1d3db10d Mon Sep 17 00:00:00 2001 From: Zac Medico Date: Tue, 18 Nov 2025 08:27:01 -0800 Subject: [PATCH 2/2] Test Python 3.14t --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index c5a195c..a1076ae 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -22,7 +22,7 @@ jobs: fail-fast: false matrix: os: [ubuntu-latest, macos-latest, windows-latest] - python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"] + python-version: ["3.8", "3.9", "3.10", "3.11", "3.12", "3.14t"] steps: - name: Set git to use LF on Windows if: runner.os == 'Windows'