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 free-threaded Python 3.13t #1628

Merged
merged 3 commits into from
Feb 7, 2025
Merged

Conversation

davidhewitt
Copy link
Contributor

Change Summary

Adds the PyO3 flag #[pymodule(gil_used = false)] to declare full support for free-threading.

Also adds wheel builds for 3.13t.

(I couldn't help myself doing a drive-by cleanup to the #[pymodule] to use more modern PyO3 syntax at the same time.)

cc @ngoldbaum

Related issue number

Closes #1555

Checklist

  • Unit tests for the changes exist
  • Documentation reflects the changes where applicable
  • Pydantic tests pass with this pydantic-core (except for expected changes)
  • My PR is ready to review, please add a comment including the phrase "please review" to assign reviewers

Copy link

codspeed-hq bot commented Feb 6, 2025

CodSpeed Performance Report

Merging #1628 will not alter performance

Comparing dh/support-free-threaded (a3e3911) with main (db63fec)

Summary

✅ 157 untouched benchmarks

@davidhewitt davidhewitt added the Full Build cause CI to do a full build label Feb 6, 2025
@davidhewitt
Copy link
Contributor Author

Removed a needless use of unsafe code while I'm at it (probably predates the addition of an API in PyO3 to do the same).

@davidhewitt davidhewitt merged commit ce46756 into main Feb 7, 2025
63 of 64 checks passed
@davidhewitt davidhewitt deleted the dh/support-free-threaded branch February 7, 2025 14:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Full Build cause CI to do a full build
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Plan to support free-threaded Python
2 participants