build: enable free-threaded wheels in cibuildwheel#121
Merged
Conversation
cibuildwheel does not build free-threaded CPython wheels by default, even
when the build pattern matches cp*. As a result, users on 3.13t/3.14t/3.15t
installed pure-Python wheels with no native extension and saw:
Failed to load instrument hooks library: cannot import name
'dist_instrument_hooks' from 'pytest_codspeed.instruments.hooks'
Opt in via `enable = ["cpython-freethreading"]` so the cp31{3,4,5}t wheels
ship the compiled dist_instrument_hooks extension.
Co-Authored-By: Claude <noreply@anthropic.com>
v3.2.1 predates CPython 3.14/3.15 support in cibuildwheel. Bumping unlocks free-threaded 3.14t/3.15t wheel builds (which no longer need the cpython-freethreading enable flag — only 3.13t does). Co-Authored-By: Claude <noreply@anthropic.com>
CPython 3.15 is still in beta, so cibuildwheel will not build cp315 / cp315t wheels without the cpython-prerelease opt-in. Add it alongside cpython-freethreading so prerelease wheels (regular + free-threaded) ship for users testing on 3.15. Co-Authored-By: Claude <noreply@anthropic.com>
Add the trove classifier for 3.15 now that cibuildwheel ships cp315 / cp315t wheels. Co-Authored-By: Claude <noreply@anthropic.com>
Merging this PR will not alter performance
|
| Mode | Benchmark | BASE |
HEAD |
Efficiency | |
|---|---|---|---|---|---|
| ⚡ | WallTime | test_open_close_fd[10] |
99.2 µs | 93.2 µs | +6.45% |
| ⚡ | WallTime | test_fs_write[100] |
14.3 µs | 13.8 µs | +3.73% |
| ⚡ | WallTime | test_sum_of_squares[sum_of_squares_sum_labmda_product] |
295.6 µs | 281.2 µs | +5.12% |
| ⚡ | WallTime | test_make_bandpass |
5.7 µs | 5.5 µs | +2.21% |
| ⚡ | WallTime | test_make_highshelf |
8 µs | 7.8 µs | +2.6% |
| ❌ | WallTime | test_generate_all_permutations[sequence1] |
162.6 µs | 167.1 µs | -2.65% |
| ❌ | WallTime | test_generate_all_subsequences[sequence1] |
95.5 µs | 98.7 µs | -3.2% |
| ❌ | WallTime | test_minimax[scores0] |
7.7 µs | 8 µs | -3.05% |
| ⚡ | WallTime | test_mmap_operation[40960] |
49.9 µs | 48.6 µs | +2.64% |
| ⚡ | WallTime | test_multiprocessing_map[100] |
56.9 ms | 55.8 ms | +2.07% |
| ❌ | WallTime | test_noop_pass |
498.2 ns | 538 ns | -7.39% |
| ❌ | WallTime | test_array_alloc[100] |
1.1 µs | 1.2 µs | -3.57% |
| ⚡ | WallTime | test_generate_all_combinations[5-4] |
11.1 µs | 10.4 µs | +7.02% |
| ⚡ | WallTime | test_sudoku[initial_grid0] |
8.3 µs | 8.1 µs | +3.52% |
| ⚡ | WallTime | test_make_lowpass |
5.8 µs | 5.3 µs | +9.17% |
| ⚡ | WallTime | test_iir_filter_process |
3.2 µs | 3.1 µs | +4.04% |
| ⚡ | WallTime | test_make_peak |
7.1 µs | 6.4 µs | +9.93% |
| ⚡ | WallTime | test_open_close_fd[1000] |
9.4 ms | 9 ms | +4.21% |
| ❌ | WallTime | test_fs_write[10000] |
42.5 µs | 44.2 µs | -3.95% |
| ⚡ | WallTime | test_hostname_resolution[localhost] |
125.5 µs | 122.2 µs | +2.74% |
| ... | ... | ... | ... | ... | ... |
ℹ️ Only the first 20 benchmarks are displayed. Go to the app to view all benchmarks.
Tip
Investigate this regression by commenting @codspeedbot fix this regression on this PR, or directly use the CodSpeed MCP with your agent.
Comparing fix/freethreaded-wheels (8b581dd) with master (080d620)
v3.4.1 does not yet include cp315 in its bundled build-platforms.toml, so the cpython-prerelease enable flag has nothing to act on. Pin to commit ec0977e (post-#2833 "add CPython 3.15 beta 1") to unblock cp315 / cp315t wheel builds. Drop the pin back to a tagged release once cibuildwheel ships 3.15 metadata. Co-Authored-By: Claude <noreply@anthropic.com>
The cibuildwheel commit we pin (post-#2684) no longer recognizes
cpython-freethreading: 3.13t support was dropped and free-threading is the
default for 3.14+. Keeping the value triggers:
cibuildwheel: Failed to parse enable group. Unknown enable group:
cpython-freethreading.
Only cpython-prerelease is still needed (for cp315 / cp315t while 3.15 is
in beta).
Co-Authored-By: Claude <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Opt cibuildwheel into building free-threaded CPython wheels so the
dist_instrument_hooksnative extension actually ships for 3.13t / 3.14t /3.15t.
cibuildwheel does not build free-threaded wheels by default, even when the
buildpattern matchescp*. Without the opt-in, users on free-threadedinterpreters fell back to a pure-Python install with no compiled extension and
saw at runtime:
Pairs with #120 (which declares the extension free-thread safe so the GIL stays
disabled on import).