Skip to content

Commit df8d668

Browse files
authored
Merge pull request #49 from Democrance/fix/python3.14build
Fix/python3.14build
2 parents df03a42 + 4821749 commit df8d668

3 files changed

Lines changed: 31 additions & 113 deletions

File tree

.github/workflows/CI.yml

Lines changed: 18 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -44,17 +44,15 @@ jobs:
4444
id: setup_freethreaded
4545
continue-on-error: true
4646
with:
47-
python-version: |
48-
3.13t
49-
3.14t
47+
python-version: 3.14t
5048
- name: Configure maturin interpreters
5149
shell: bash
5250
run: |
5351
INTERP='3.8 3.9 3.10 3.11 3.12 3.13 3.14'
5452
if [[ '${{ steps.setup_freethreaded.outcome }}' == 'success' ]]; then
55-
INTERP="$INTERP 3.13t 3.14t"
53+
INTERP="$INTERP 3.14t"
5654
else
57-
echo '::warning::Free-threaded Python (3.13t/3.14t) unavailable from setup-python; skipping cp313t/cp314t wheels this run.'
55+
echo '::warning::Free-threaded Python (3.14t) unavailable from setup-python; skipping cp314t wheels this run.'
5856
fi
5957
echo "MATURIN_INTERPRETERS=$INTERP pypy3.11" >> "$GITHUB_ENV"
6058
- name: Build wheels
@@ -92,17 +90,15 @@ jobs:
9290
id: setup_freethreaded
9391
continue-on-error: true
9492
with:
95-
python-version: |
96-
3.13t
97-
3.14t
93+
python-version: 3.14t
9894
- name: Configure maturin interpreters
9995
shell: bash
10096
run: |
10197
INTERP='3.8 3.9 3.10 3.11 3.12 3.13 3.14'
10298
if [[ '${{ steps.setup_freethreaded.outcome }}' == 'success' ]]; then
103-
INTERP="$INTERP 3.13t 3.14t"
99+
INTERP="$INTERP 3.14t"
104100
else
105-
echo '::warning::Free-threaded Python (3.13t/3.14t) unavailable from setup-python; skipping cp313t/cp314t wheels this run.'
101+
echo '::warning::Free-threaded Python (3.14t) unavailable from setup-python; skipping cp314t wheels this run.'
106102
fi
107103
echo "MATURIN_INTERPRETERS=$INTERP pypy3.11" >> "$GITHUB_ENV"
108104
- name: Build wheels
@@ -129,9 +125,8 @@ jobs:
129125
target: x86
130126
steps:
131127
- uses: actions/checkout@v4
132-
# Windows: install standard CPython only first, run maturin, then add 3.13t/3.14t and maturin again.
133-
# If both GIL and free-threaded are on PATH before a single maturin run, detection picks 3.13t for 3.13
134-
# and cp313/cp314 wheels are missing on win_amd64 (see https://github.com/PyO3/maturin-action/issues/313).
128+
# Windows: install standard CPython only first, run maturin, then add 3.14t and maturin again.
129+
# 3.13t is not supported by recent PyO3
135130
- uses: actions/setup-python@v5
136131
with:
137132
python-version: |
@@ -156,20 +151,18 @@ jobs:
156151
id: setup_freethreaded
157152
continue-on-error: true
158153
with:
159-
python-version: |
160-
3.13t
161-
3.14t
154+
python-version: 3.14t
162155
architecture: ${{ matrix.platform.target }}
163156
- name: Warn if free-threaded Python unavailable
164157
if: steps.setup_freethreaded.outcome != 'success'
165158
run: |
166-
echo '::warning::Free-threaded Python (3.13t/3.14t) unavailable from setup-python; skipping cp313t/cp314t wheels this run.'
159+
echo '::warning::Free-threaded Python (3.14t) unavailable from setup-python; skipping cp314t wheels this run.'
167160
- name: Build wheels (free-threaded)
168161
if: steps.setup_freethreaded.outcome == 'success'
169162
uses: PyO3/maturin-action@v1
170163
with:
171164
target: ${{ matrix.platform.target }}
172-
args: --release --out dist -i 3.13t 3.14t
165+
args: --release --out dist -i 3.14t
173166
sccache: 'true'
174167
- name: Upload wheels
175168
uses: actions/upload-artifact@v4
@@ -201,17 +194,15 @@ jobs:
201194
id: setup_freethreaded
202195
continue-on-error: true
203196
with:
204-
python-version: |
205-
3.13t
206-
3.14t
197+
python-version: 3.14t
207198
- name: Configure maturin interpreters
208199
shell: bash
209200
run: |
210201
INTERP='3.8 3.9 3.10 3.11 3.12 3.13 3.14'
211202
if [[ '${{ steps.setup_freethreaded.outcome }}' == 'success' ]]; then
212-
INTERP="$INTERP 3.13t 3.14t"
203+
INTERP="$INTERP 3.14t"
213204
else
214-
echo '::warning::Free-threaded Python (3.13t/3.14t) unavailable from setup-python; skipping cp313t/cp314t wheels this run.'
205+
echo '::warning::Free-threaded Python (3.14t) unavailable from setup-python; skipping cp314t wheels this run.'
215206
fi
216207
echo "MATURIN_INTERPRETERS=$INTERP pypy3.11" >> "$GITHUB_ENV"
217208
- name: Build wheels
@@ -230,24 +221,18 @@ jobs:
230221
runs-on: ubuntu-latest
231222
steps:
232223
- uses: actions/checkout@v4
233-
# Try 3.14t first, then 3.13t. Use outcome (not conclusion): continue-on-error leaves conclusion "success"
224+
# Try 3.14t first. Use outcome (not conclusion) - 3.13t isn't supported: continue-on-error leaves conclusion "success"
234225
# even when setup fails, but outcome stays "failure" so we can chain fallbacks reliably.
235226
- uses: actions/setup-python@v5
236227
id: py314t
237228
continue-on-error: true
238229
with:
239230
python-version: '3.14t'
240-
- uses: actions/setup-python@v5
241-
id: py313t
242-
if: steps.py314t.outcome != 'success'
243-
continue-on-error: true
244-
with:
245-
python-version: '3.13t'
246231
- name: Resolve free-threaded interpreter
247232
id: ft_py
248233
run: |
249234
ready=false
250-
if [[ '${{ steps.py314t.outcome }}' == 'success' ]] || [[ '${{ steps.py313t.outcome }}' == 'success' ]]; then
235+
if [[ '${{ steps.py314t.outcome }}' == 'success' ]]; then
251236
ready=true
252237
fi
253238
echo "ready=${ready}" >> "$GITHUB_OUTPUT"
@@ -260,17 +245,13 @@ jobs:
260245
shell: bash
261246
run: |
262247
set -euo pipefail
263-
if [[ '${{ steps.py314t.outcome }}' == 'success' ]]; then
264-
export UV_PYTHON='${{ steps.py314t.outputs.python-path }}'
265-
else
266-
export UV_PYTHON='${{ steps.py313t.outputs.python-path }}'
267-
fi
248+
export UV_PYTHON='${{ steps.py314t.outputs.python-path }}'
268249
uv sync --extra dev --locked
269250
uv run pytest tests/
270251
- name: Free-threaded Python unavailable
271252
if: steps.ft_py.outputs.ready != 'true'
272253
run: |
273-
echo '::notice::No free-threaded Python (3.14t / 3.13t) available from setup-python for this runner; skipping extension tests.'
254+
echo '::notice::No free-threaded Python (3.14t) available from setup-python for this runner; skipping extension tests.'
274255
275256
sdist:
276257
runs-on: ubuntu-latest

Cargo.lock

Lines changed: 12 additions & 75 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ name = "bidi"
99
crate-type = ["cdylib"]
1010

1111
[dependencies]
12-
pyo3 = { version = "0.27.1", features = [
12+
pyo3 = { version = "0.29.0", features = [
1313
"extension-module",
1414
"generate-import-lib",
1515
] }

0 commit comments

Comments
 (0)