mirror of
https://github.com/protocolbuffers/protobuf
synced 2026-08-26 02:23:14 -04:00
This CL fixes all known bugs in Python/upb that prevented the library from being thread-compatible under free threading (GIL disabled). Key components: 1. Thread-safety primitives: Added `PyUpb_WeakMap`, `PyUpb_LazyPtr`, and `PyUpb_Mutex` under `third_party/upb/python/free_threading`. 2. Message WeakMap: Unset subobject weak maps in `PyUpb_Message` are initialized and updated thread-safely. 3. ModuleState WeakMap: Upgraded global descriptor_map in `PyUpb_ModuleState` to PyUpb_WeakMap so descriptor caching across threads is thread-safe. 4. Arena & Container Thread Safety: Made arena caching, refcounting, map container versioning, and repeated container reification thread-safe under free-threading. PiperOrigin-RevId: 912670831 |
||
|---|---|---|
| .. | ||
| protobuf | ||
| __init__.py | ||