Skip to content

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

@codspeed-hq
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
davidhewitt added a commit to pydantic/pydantic that referenced this pull request Oct 20, 2025
davidhewitt added a commit to pydantic/pydantic that referenced this pull request Oct 22, 2025
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

3 participants