-
Notifications
You must be signed in to change notification settings - Fork 16k
Open
Labels
Description
This issue is intended to track the efforts of adding support for the free-threaded build for CPython (either 3.13t or 3.14t). The Python free-threading guide contains some helpful advice on approaching this task. Based on that guide, I think the following steps make sense:
- Define and document the thread safety guarantees that apply to the
protobufpackage. - Revise pure-Python version of the package to meet those guarantees.
- Revise the "upb" backend.
- Revise the "cpp" backend, only if there is a concrete need for a free-threaded compatible version of it.
Related issues and PRs:
- Support Python 3.13t (upb) #20304 : Some discussion about free-threaded support occurred in this issue.
[Python] Building with 3.13t or 3.14t results in wrong .so filename #23017Fix thread safety issues when sharingMessageobjects across threads #23056Hold a per-object mutex when modifying PyUpb_WeakMaps #23024Use strong reference CPython C APIs under free-threading #22736- Add support for free-threaded CPython build #23202: This PR includes changes from previous 3 PRs and fixes the .so filename bug.
merlinz01