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

Support the free-threaded build of CPython 3.13 #1456

Open
wants to merge 11 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.
  • Fix thread-safety issues in the Cython extension module.

Are there changes in behavior for the user?

No.

Related issue number

#1455

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
Copy link

codspeed-hq bot commented Jan 23, 2025

CodSpeed Performance Report

Merging #1456 will degrade performances by 48.24%

Comparing lysnikolaou:free-threading-support (876ec6e) with master (07c1b4f)

Summary

⚡ 4 improvements
❌ 25 regressions
✅ 70 untouched benchmarks

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

Benchmarks breakdown

Benchmark BASE HEAD Change
test_long_query 5.9 ms 10.8 ms -45.55%
test_long_query_with_pct 17.9 ms 33.3 ms -46.25%
test_quote_long_path 4.8 ms 8.9 ms -45.49%
test_quote_query_string 313.5 µs 519 µs -39.6%
test_quoter_ascii 123.9 µs 174.3 µs -28.96%
test_quoter_pct 242.9 µs 432.6 µs -43.85%
test_quoter_quote_utf8 683.3 µs 1,320.2 µs -48.24%
test_unquoter_long_ascii 22.5 ms 13.7 ms +64.21%
test_unquoter_long_pct 25.4 ms 16.7 ms +51.81%
test_unquoter_short 288.2 µs 226.6 µs +27.21%
test_extend_query_subclassed_str 1 ms 1.1 ms -7.09%
test_path_safe_uncached 255.2 µs 226.3 µs +12.81%
test_update_query_mapping 963.3 µs 1,039.8 µs -7.36%
test_update_query_mapping_with_existing_query 1.3 ms 1.4 ms -9.75%
test_update_query_sequence_mapping 4.5 ms 5.3 ms -14.45%
test_url_build_no_netloc 429.6 µs 500.7 µs -14.19%
test_url_build_no_netloc_relative 417.8 µs 483.2 µs -13.54%
test_url_build_with_simple_query 2.8 ms 3.1 ms -9.26%
test_url_extend_query_existing_query_simple_query_dict 697.7 µs 772.2 µs -9.65%
test_url_extend_query_existing_query_string 153.4 µs 165.9 µs -7.54%
... ... ... ... ...

ℹ️ Only the first 20 benchmarks are displayed. Go to the app to view all benchmarks.

Copy link

codecov bot commented Jan 23, 2025

Codecov Report

Attention: Patch coverage is 96.94656% with 4 lines in your changes missing coverage. Please review.

Project coverage is 90.86%. Comparing base (07c1b4f) to head (876ec6e).

Files with missing lines Patch % Lines
yarl/_quoting_c.pyx 81.81% 4 Missing ⚠️

❗ There is a different number of reports uploaded between BASE (07c1b4f) and HEAD (876ec6e). Click for more details.

HEAD has 94 uploads less than BASE
Flag BASE (07c1b4f) HEAD (876ec6e)
CI-GHA 46 26
MyPy 2 0
OS-macOS 10 6
pytest 44 26
VM-macos-latest 10 6
Py-3.11.9 4 2
Py-3.12.8 8 4
Py-3.11.11 4 2
OS-Linux 24 14
VM-ubuntu-latest 24 14
Py-3.9.21 4 2
Py-3.10.16 4 2
Py-3.10.11 4 2
Py-3.9.13 4 2
OS-Windows 10 6
VM-windows-latest 10 6
Py-pypy7.3.17 2 1
Py-pypy7.3.16 2 1
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1456      +/-   ##
==========================================
- Coverage   96.14%   90.86%   -5.29%     
==========================================
  Files          31       23       -8     
  Lines        5970     4949    -1021     
  Branches      364      332      -32     
==========================================
- Hits         5740     4497    -1243     
- Misses        204      451     +247     
+ Partials       26        1      -25     
Flag Coverage Δ
CI-GHA 90.80% <96.94%> (-5.35%) ⬇️
MyPy ?
OS-Linux 90.80% <96.94%> (-8.77%) ⬇️
OS-Windows 90.34% <100.00%> (-9.29%) ⬇️
OS-macOS 90.64% <96.94%> (-8.68%) ⬇️
Py-3.10.11 90.50% <96.94%> (-8.80%) ⬇️
Py-3.10.16 90.72% <96.94%> (-8.80%) ⬇️
Py-3.11.11 90.72% <96.94%> (-8.80%) ⬇️
Py-3.11.9 90.50% <96.94%> (-8.80%) ⬇️
Py-3.12.8 90.72% <96.94%> (-8.80%) ⬇️
Py-3.13.1 90.59% <100.00%> (-8.93%) ⬇️
Py-3.9.13 90.46% <96.94%> (-8.80%) ⬇️
Py-3.9.21 90.68% <96.94%> (-8.80%) ⬇️
Py-pypy7.3.16 90.25% <100.00%> (-9.29%) ⬇️
Py-pypy7.3.17 90.27% <100.00%> (-9.29%) ⬇️
VM-macos-latest 90.64% <96.94%> (-8.68%) ⬇️
VM-ubuntu-latest 90.80% <96.94%> (-8.77%) ⬇️
VM-windows-latest 90.34% <100.00%> (-9.29%) ⬇️
pytest 90.80% <96.94%> (-8.77%) ⬇️

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.

1 participant