Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement support for the free-threaded build of CPython 3.13 #84

Open
wants to merge 7 commits into
base: master
Choose a base branch
from

Conversation

lysnikolaou
Copy link

What do these changes do?

  • Add a matrix config for free-threaded Python to run tests with it.
  • Change configuration to correctly build wheels under the free-threaded build.

Are there changes in behavior for the user?

No.

Related issue number

Checklist

  • I think the code is well written
  • Unit tests for the changes exist
  • Documentation reflects the changes

@psf-chronographer psf-chronographer bot added the bot:chronographer:provided There is a change note present in this PR label Dec 20, 2024
pyproject.toml Outdated Show resolved Hide resolved
MANIFEST.in Outdated Show resolved Hide resolved
@@ -1,4 +1,4 @@
# cython: language_level=3
# cython: language_level=3, freethreading_compatible=True
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this can go into pyproject.toml. There's a section for Cython.

Copy link
Author

@lysnikolaou lysnikolaou Jan 9, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I tried that but it unfortunately cannot, because there's not the ability to add a version-specific option to pyproject.toml. For this, the build backend would have to be changed, which seems like a bigger hassle.

scripts/cibw_before_build.sh Outdated Show resolved Hide resolved
@lysnikolaou
Copy link
Author

Hey folks, thanks for all the review and sorry for the extended delay here, I was out on PTO. I've addressed most of the comments around adding some TODOs and replied to the rest.

Copy link

codspeed-hq bot commented Jan 13, 2025

CodSpeed Performance Report

Merging #84 will degrade performances by 7.82%

Comparing lysnikolaou:freethreading-support (880daae) with master (0fc162b)

Summary

❌ 1 regressions
✅ 3 untouched benchmarks

⚠️ Please fix the performance issues or acknowledge them on CodSpeed.

Benchmarks breakdown

Benchmark master lysnikolaou:freethreading-support Change
test_under_cached_property_cache_hit 68.1 µs 73.9 µs -7.82%

Copy link

codecov bot commented Jan 13, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 89.03%. Comparing base (0fc162b) to head (880daae).

Additional details and impacted files
@@            Coverage Diff             @@
##           master      #84      +/-   ##
==========================================
+ Coverage   89.02%   89.03%   +0.01%     
==========================================
  Files          18       18              
  Lines         738      739       +1     
  Branches       75       75              
==========================================
+ Hits          657      658       +1     
  Misses         63       63              
  Partials       18       18              
Flag Coverage Δ
CI-GHA 89.03% <100.00%> (+0.01%) ⬆️
MyPy 78.53% <100.00%> (+0.03%) ⬆️
OS-Linux 99.44% <100.00%> (ø)
OS-Windows 95.41% <ø> (ø)
OS-macOS 95.86% <100.00%> (ø)
Py-3.10.11 95.59% <100.00%> (ø)
Py-3.10.16 97.79% <100.00%> (ø)
Py-3.11.11 97.79% <100.00%> (ø)
Py-3.11.9 95.59% <100.00%> (ø)
Py-3.12.8 97.79% <100.00%> (ø)
Py-3.13.1 97.55% <ø> (-0.25%) ⬇️
Py-3.9.13 95.58% <100.00%> (ø)
Py-3.9.21 97.79% <100.00%> (ø)
Py-pypy7.3.16 97.23% <ø> (ø)
Py-pypy7.3.17 97.24% <ø> (ø)
VM-macos-latest 95.86% <100.00%> (ø)
VM-ubuntu-latest 99.44% <100.00%> (ø)
VM-windows-latest 95.41% <ø> (ø)
pytest 99.44% <100.00%> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bot:chronographer:provided There is a change note present in this PR
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants