ENH: Enable free threading python & support Python 3.14 (#3425)

* CI: Python 3.14

* ENH: Enable free threading python
This commit is contained in:
Alan D. Snow 2025-11-06 14:37:41 -06:00 committed by GitHub
parent 3b06aee018
commit 648599b65d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 8 additions and 9 deletions

View File

@ -97,13 +97,11 @@ jobs:
strategy:
fail-fast: false
matrix:
python-version: ['3.10', '3.11', '3.12', '3.13']
gdal-version: ['3.11.4']
python-version: ['3.9', '3.10', '3.11', '3.12', '3.13', '3.14']
gdal-version: ['3.11.5']
include:
- python-version: '3.13'
- python-version: '3.14'
gdal-version: 'latest'
- python-version: '3.9'
gdal-version: '3.11.4'
- python-version: '3.9'
gdal-version: '3.10.3'
- python-version: '3.9'
@ -159,7 +157,7 @@ jobs:
# macos-15-intel is OSX Intel
# macos-14 is OSX Arm64
os: [macos-15-intel, macos-14]
python-version: ['3.9', '3.10', '3.11', '3.12', '3.13']
python-version: ['3.9', '3.10', '3.11', '3.12', '3.13', '3.14']
include:
- os: ubuntu-latest
python-version: '*'

View File

@ -2,7 +2,7 @@
requires = [
"setuptools>=67.8",
"wheel",
"cython~=3.0.2",
"cython~=3.1.0",
"numpy>=2"
]
build-backend = "setuptools.build_meta"

View File

@ -207,9 +207,9 @@ elif cpp11_flag not in eca:
cpp_ext_options['extra_compile_args'] = eca
# Configure optional Cython coverage.
cythonize_options = {"language_level": sys.version_info[0]}
cythonize_options = {"language_level": sys.version_info[0], "compiler_directives": {"freethreading_compatible": True}}
if os.environ.get('CYTHON_COVERAGE'):
cythonize_options['compiler_directives'] = {'linetrace': True}
cythonize_options['compiler_directives'].update(linetrace=True)
cythonize_options['annotate'] = True
ext_options['define_macros'].extend(
[('CYTHON_TRACE', '1'), ('CYTHON_TRACE_NOGIL', '1')])
@ -302,6 +302,7 @@ setup_args = dict(
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Programming Language :: Python :: 3.14",
"Programming Language :: Python :: 3",
"Topic :: Multimedia :: Graphics :: Graphics Conversion",
"Topic :: Scientific/Engineering :: GIS",