dep-protobuf/python/google
Joshua Haberman 15e4efa932 Made Python/upb thread-compatible (removed thread-hostile code)
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
2026-08-21 14:27:15 -07:00
..
protobuf Made Python/upb thread-compatible (removed thread-hostile code) 2026-08-21 14:27:15 -07:00
__init__.py drop-deprecated-pkg-resources-declare (#22442) 2025-07-11 11:09:55 -07:00