Commit 3d4c56c
feat: create free-threaded python wheels (#1553)
* Initial commit for free threaded python support
* ci: use uvx to run maturin in native wheel builds
The free-threaded matrix entries skip `uv sync` to avoid resolving
project dependencies against cp313t/cp314t (many dev deps lack
free-threaded wheels), so `uv run --no-project maturin` failed on
macOS/Windows with "Failed to spawn: `maturin`". Switch to
`uvx maturin@1.8.1`, which runs maturin in an isolated tool env
independent of the project venv and matches the pin used by
maturin-action for manylinux builds.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
* ci: resolve free-threaded interpreter path explicitly on Windows
maturin's `--interpreter python3.14t` fails on Windows because the
free-threaded build ships as plain `python.exe` (no `tN` suffix). Look
up `sys.executable` of the python on PATH (which actions/setup-python
prepends with the free-threaded install), assert
`Py_GIL_DISABLED == 1` so a misconfigured PATH can't silently build a
GIL wheel, and normalize backslashes to forward slashes so the path
survives re-expansion in the downstream `run:` line.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
* build: enable PyO3 generate-import-lib for Windows free-threaded wheels
Windows free-threaded Python does not expose `abiflags` in sysconfig,
so PyO3's default Windows linkage path fails with "A python 3
interpreter on Windows does not define abiflags in its sysconfig ಠ_ಠ"
when building cp31Xt wheels. Enabling the `generate-import-lib` PyO3
feature switches Windows builds to a generated import library
(provided by the `python3-dll-a` crate) that does not depend on a
fully populated sysconfig. It is a no-op on macOS and Linux and is
compatible with the existing `abi3` feature.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
* ci: bump maturin to 1.13.3 for Windows free-threaded support
maturin 1.8.1 errors out on Windows free-threaded interpreters with
"A python 3 interpreter on Windows does not define abiflags in its
sysconfig" even when given a valid `python.exe`. Newer maturin
releases handle the missing abiflags gracefully for cp31Xt builds.
Bump both the `uvx maturin@` pin used for native macOS/Windows wheels
and the `maturin-version` passed to PyO3/maturin-action for the
manylinux containers.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
* ci: standardize wheel build job names as "<OS> <arch> (<tag>)"
The mac/Windows matrix shared a single name template that prepended
"macOS arm64 & Windows" to every entry, which got truncated in the
GitHub UI sidebar and made it hard to tell macOS and Windows runs
apart. Rename all wheel build jobs to the same pattern so the OS,
architecture, and python tag are visible at a glance:
- Linux x86_64 / arm64
- macOS arm64 / x86_64
- Windows x86_64
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
* taplo fmt
* build: move pygithub to release group to fix free-threaded wheel builds
pygithub pulls in cryptography via pyjwt[crypto]. cryptography 44.0.0
ships only abi3 wheels, which free-threaded interpreters cannot use, so
uv builds it from sdist; its bundled PyO3 0.23.2 caps at Python 3.13 and
fails on 3.14t. pygithub is only used by the manual release changelog
script, so move it out of the dev group into a new release group.
'uv sync --dev' (used by CI test jobs) no longer drags in cryptography.
* ci: pin uv venv to setup-python interpreter for free-threaded jobs
Passing a bare version like '3.13t' to 'uv venv --python' let uv fall
back to a different system interpreter (3.12), creating a venv whose ABI
did not match the downloaded cp313t wheel and failing the install. Use
the python-path output from setup-python so the venv uses exactly the
interpreter that was set up.
* taplo fmt
* ci: set UV_PYTHON so uv sync keeps the free-threaded interpreter
Pinning only 'uv venv --python' was not enough: 'uv sync' ignores the
existing .venv, runs its own interpreter discovery, and recreated the
venv with the system 3.12, again mismatching the cp313t wheel. Set
UV_PYTHON to the setup-python interpreter for the install and test
steps so every uv command (venv, sync, pip, run) uses it.
* ci: run tests from the .venv, not the bare setup-python interpreter
Setting UV_PYTHON on the test step pointed 'uv run --no-project pytest'
at the setup-python interpreter, which has no pytest installed, causing
'Failed to spawn: pytest'. UV_PYTHON is only needed in the install step
to build the .venv with the right interpreter; the test step must use
that .venv. Drop UV_PYTHON from the test step.
Co-Authored-By: Claude <noreply@anthropic.com>
* ci: install datafusion wheel into the activated .venv
Setting UV_PYTHON as a step env split the install across two
environments: 'uv sync' populated .venv while 'uv pip install' targeted
the bare setup-python interpreter, so the datafusion wheel never landed
in .venv and 'import datafusion' failed under pytest. Pin the
interpreter at 'uv venv --python', activate the venv, and pass --active
to 'uv sync' so sync and pip install both target the same .venv.
Co-Authored-By: Claude <noreply@anthropic.com>
* ci: point uv at the venv interpreter by path for free-threaded jobs
Activating the venv and passing --active still let 'uv sync' run its own
interpreter discovery, which skips free-threaded builds and re-picked the
system 3.12, recreating .venv and breaking the cp313t/cp314t wheel
install. Pass the venv's own interpreter (.venv/bin/python) explicitly to
'uv sync', 'uv pip install', and 'uv run' so every step stays in the
free-threaded environment created by 'uv venv'.
Co-Authored-By: Claude <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>1 parent 0840763 commit 3d4c56c
8 files changed
Lines changed: 247 additions & 85 deletions
File tree
- .github
- actions/build-wheel
- workflows
- crates/core
- dev/release
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
135 | 135 | | |
136 | 136 | | |
137 | 137 | | |
138 | | - | |
| 138 | + | |
139 | 139 | | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
140 | 144 | | |
141 | 145 | | |
142 | 146 | | |
| |||
153 | 157 | | |
154 | 158 | | |
155 | 159 | | |
156 | | - | |
| 160 | + | |
157 | 161 | | |
158 | 162 | | |
159 | 163 | | |
| |||
172 | 176 | | |
173 | 177 | | |
174 | 178 | | |
175 | | - | |
176 | | - | |
177 | | - | |
178 | | - | |
179 | | - | |
180 | | - | |
181 | | - | |
182 | | - | |
183 | | - | |
184 | | - | |
185 | | - | |
186 | | - | |
| 179 | + | |
| 180 | + | |
187 | 181 | | |
188 | 182 | | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
189 | 186 | | |
190 | | - | |
191 | | - | |
192 | 187 | | |
| 188 | + | |
193 | 189 | | |
| 190 | + | |
194 | 191 | | |
195 | 192 | | |
196 | 193 | | |
| |||
202 | 199 | | |
203 | 200 | | |
204 | 201 | | |
205 | | - | |
| 202 | + | |
206 | 203 | | |
207 | 204 | | |
208 | 205 | | |
| 206 | + | |
209 | 207 | | |
210 | 208 | | |
211 | 209 | | |
| |||
216 | 214 | | |
217 | 215 | | |
218 | 216 | | |
219 | | - | |
| 217 | + | |
220 | 218 | | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
221 | 223 | | |
222 | 224 | | |
223 | 225 | | |
| |||
234 | 236 | | |
235 | 237 | | |
236 | 238 | | |
237 | | - | |
| 239 | + | |
238 | 240 | | |
239 | 241 | | |
240 | 242 | | |
| |||
253 | 255 | | |
254 | 256 | | |
255 | 257 | | |
256 | | - | |
257 | | - | |
258 | | - | |
259 | | - | |
260 | | - | |
261 | | - | |
262 | | - | |
263 | | - | |
264 | | - | |
265 | | - | |
266 | | - | |
267 | | - | |
| 258 | + | |
| 259 | + | |
268 | 260 | | |
269 | 261 | | |
| 262 | + | |
| 263 | + | |
| 264 | + | |
270 | 265 | | |
271 | | - | |
272 | | - | |
273 | 266 | | |
274 | 267 | | |
275 | 268 | | |
276 | 269 | | |
277 | 270 | | |
278 | | - | |
| 271 | + | |
279 | 272 | | |
280 | 273 | | |
281 | 274 | | |
282 | 275 | | |
283 | 276 | | |
284 | 277 | | |
285 | 278 | | |
286 | | - | |
| 279 | + | |
287 | 280 | | |
288 | 281 | | |
289 | 282 | | |
290 | 283 | | |
291 | | - | |
292 | 284 | | |
| 285 | + | |
293 | 286 | | |
294 | 287 | | |
295 | 288 | | |
| |||
305 | 298 | | |
306 | 299 | | |
307 | 300 | | |
308 | | - | |
| 301 | + | |
| 302 | + | |
| 303 | + | |
| 304 | + | |
| 305 | + | |
| 306 | + | |
| 307 | + | |
| 308 | + | |
309 | 309 | | |
310 | 310 | | |
311 | 311 | | |
| |||
318 | 318 | | |
319 | 319 | | |
320 | 320 | | |
| 321 | + | |
321 | 322 | | |
322 | 323 | | |
323 | | - | |
324 | | - | |
325 | | - | |
| 324 | + | |
| 325 | + | |
326 | 326 | | |
327 | | - | |
| 327 | + | |
328 | 328 | | |
329 | 329 | | |
330 | | - | |
331 | | - | |
332 | | - | |
333 | | - | |
334 | | - | |
335 | | - | |
336 | | - | |
| 330 | + | |
| 331 | + | |
| 332 | + | |
| 333 | + | |
| 334 | + | |
| 335 | + | |
| 336 | + | |
337 | 337 | | |
338 | 338 | | |
339 | 339 | | |
| |||
350 | 350 | | |
351 | 351 | | |
352 | 352 | | |
353 | | - | |
| 353 | + | |
354 | 354 | | |
355 | 355 | | |
356 | 356 | | |
| |||
359 | 359 | | |
360 | 360 | | |
361 | 361 | | |
| 362 | + | |
362 | 363 | | |
363 | 364 | | |
364 | 365 | | |
365 | 366 | | |
366 | | - | |
| 367 | + | |
367 | 368 | | |
368 | 369 | | |
369 | 370 | | |
| |||
379 | 380 | | |
380 | 381 | | |
381 | 382 | | |
382 | | - | |
| 383 | + | |
| 384 | + | |
| 385 | + | |
| 386 | + | |
| 387 | + | |
| 388 | + | |
| 389 | + | |
| 390 | + | |
383 | 391 | | |
384 | 392 | | |
385 | 393 | | |
| |||
392 | 400 | | |
393 | 401 | | |
394 | 402 | | |
| 403 | + | |
395 | 404 | | |
396 | 405 | | |
397 | | - | |
398 | | - | |
399 | | - | |
| 406 | + | |
| 407 | + | |
| 408 | + | |
| 409 | + | |
| 410 | + | |
| 411 | + | |
| 412 | + | |
400 | 413 | | |
401 | 414 | | |
402 | 415 | | |
403 | 416 | | |
404 | 417 | | |
405 | 418 | | |
406 | 419 | | |
407 | | - | |
| 420 | + | |
408 | 421 | | |
409 | 422 | | |
410 | 423 | | |
| |||
509 | 522 | | |
510 | 523 | | |
511 | 524 | | |
512 | | - | |
| 525 | + | |
| 526 | + | |
513 | 527 | | |
514 | 528 | | |
515 | 529 | | |
516 | | - | |
| 530 | + | |
517 | 531 | | |
518 | 532 | | |
519 | 533 | | |
| |||
0 commit comments