Skip to content

Commit dc52695

Browse files
authored
Merge pull request #2720 from QuLogic/freethreading
Enable testing and building of freethreaded/3.15 wheels
2 parents d60abe9 + 957e642 commit dc52695

4 files changed

Lines changed: 22 additions & 8 deletions

File tree

‎.github/workflows/ci-testing.yml‎

Lines changed: 19 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ jobs:
2424
fail-fast: false
2525
matrix:
2626
os: [ubuntu-latest, macos-latest, windows-latest]
27-
python-version: ['3.11', '3.12', '3.13', '3.14']
27+
python-version: ['3.11', '3.12', '3.13', '3.14', '3.14t', '3.15', '3.15t']
2828
use-network: [true]
2929
include:
3030
- os: ubuntu-latest
@@ -42,6 +42,7 @@ jobs:
4242
uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7.0.0
4343
with:
4444
python-version: ${{ matrix.python-version }}
45+
allow-prereleases: true
4546
cache: 'pip'
4647

4748
- name: Minimum packages
@@ -74,19 +75,28 @@ jobs:
7475
--extra-index-url https://pypi.anaconda.org/scientific-python-nightly-wheels/simple \
7576
matplotlib pyproj scipy shapely
7677
78+
- name: Install Shapely for Python 3.15
79+
if: startsWith(matrix.python-version, '3.15')
80+
run: |
81+
# Install Shapely from Scientific Python until wheel is released.
82+
# https://github.com/shapely/shapely/issues/2413
83+
python -m pip install --pre --prefer-binary \
84+
--extra-index-url https://pypi.anaconda.org/scientific-python-nightly-wheels/simple \
85+
shapely
86+
7787
- name: Install Cartopy
7888
id: install
7989
run: |
8090
if [ ${{ steps.minimum-packages.conclusion }} == 'skipped' ]; then
8191
# Default is to install just the minimum testing requirements,
8292
# but we want to get as much coverage as possible.
83-
if [ ${{ matrix.python-version }} == '3.14' ]; then
84-
# remove this if loop when fiona wheels are available for py3.14
93+
EXTRA_PACKAGES=',ows,plotting'
94+
if [[ "${{ matrix.python-version }}" =~ 3.1[123] ]]; then
95+
EXTRA_PACKAGES="${EXTRA_PACKAGES},speedups"
96+
else
97+
# remove this if condition when fiona wheels are available for py3.14+
8598
# https://github.com/Toblerity/Fiona/issues/1504
86-
EXTRA_PACKAGES=',ows,plotting'
8799
pip install pykdtree
88-
else
89-
EXTRA_PACKAGES=',ows,plotting,speedups'
90100
fi
91101
fi
92102
pip install -e .[test${EXTRA_PACKAGES}]
@@ -95,8 +105,10 @@ jobs:
95105
- name: Testing
96106
id: test
97107
if: matrix.use-network
98-
# we need to force bash to use line continuations on Windows
99108
run: |
109+
if [[ "${{ matrix.python-version }}" == 3.*t ]]; then
110+
export PYTHON_GIL=0
111+
fi
100112
# Check that the downloader tool at least knows where to get the data from (but don't actually download it)
101113
python -m cartopy.feature.download gshhs physical --dry-run
102114
# It should also be available as a script

‎.github/workflows/release.yml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ jobs:
101101
with:
102102
package-dir: dist/${{ needs.build_sdist.outputs.SDIST_NAME }}
103103
env:
104-
CIBW_SKIP: "*_i686 cp3*t-*"
104+
CIBW_SKIP: "*_i686"
105105
CIBW_ARCHS: ${{ matrix.cibw_archs }}
106106

107107
- uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1

‎lib/cartopy/trace.pyx‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
# See LICENSE in the root of the repository for full licensing details.
55
#
66
# cython: embedsignature=True
7+
# cython: freethreading_compatible = True
78

89
"""
910
Trace pulls together proj, GEOS and ``_crs.pyx`` to implement a function to project a

‎pyproject.toml‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ classifiers = [
4040
'Programming Language :: Python :: 3.13',
4141
'Programming Language :: Python :: 3.14',
4242
'Programming Language :: Python :: 3 :: Only',
43+
'Programming Language :: Python :: Free Threading :: 2 - Beta',
4344
'Topic :: Scientific/Engineering',
4445
'Topic :: Scientific/Engineering :: GIS',
4546
'Topic :: Scientific/Engineering :: Visualization',

0 commit comments

Comments
 (0)