dep-protobuf/python/google/protobuf/pyext
Samuel Benzaquen 1a23830881 [Py/C++] Fixed data race in Python free threading by removing obsolete hack
We previously had a hack in Python/C++ Protobuf to account for the fact that LazyField did not properly remember a custom DescriptorPool or MessageFactory that was set in the ParseContext at parse time.

The code has since been fixed to properly handle the case where ParseContext contains a custom DescriptorPool/MessageFactory.  Removing the hack removes the data race under free threading.

PiperOrigin-RevId: 967236272
2026-08-19 08:59:26 -07:00
..
__init__.py Remove uses of pkg_resources in non-namespace packages. (#7902) 2020-09-22 20:46:07 -07:00
cpp_message.py Auto-format Py Proto python files. 2026-04-29 13:40:58 -07:00
descriptor.cc Emit future warning when mutating GetOptions() in OSS 2026-07-12 13:41:24 -07:00
descriptor.h Shorten our license headers into an abbreviated form that references LICENSE instead of including it in full. 2023-09-08 17:59:33 -07:00
descriptor_containers.cc Emit deprecation warning when comparing descriptor containers with unrecognized types in OSS 2026-07-10 12:16:37 -07:00
descriptor_containers.h Shorten our license headers into an abbreviated form that references LICENSE instead of including it in full. 2023-09-08 17:59:33 -07:00
descriptor_database.cc [py/C++] Implement Make GetOptions() return immutable options. C++ will raise a TypeError when options returned GetOptions() by is mutated. 2026-06-03 13:10:50 -07:00
descriptor_database.h Automated Code Change 2025-07-23 00:17:43 -07:00
descriptor_pool.cc Format descriptor_pool.cc to eliminate pre-existing lint issues. 2026-07-06 21:38:41 -07:00
descriptor_pool.h Add PyDescriptorPool_FromSharedPool(std::shared_ptr) API 2026-06-26 11:48:30 -07:00
extension_dict.cc Add PyDescriptorPool_FromSharedPool(std::shared_ptr) API 2026-06-26 11:48:30 -07:00
extension_dict.h [python] Remove semicolon after PyObject_HEAD (#16123) 2024-11-27 10:08:21 -08:00
field.cc Prepare the code for migrating protobuf string accessors to 2024-07-10 12:37:43 -07:00
field.h [python] Remove semicolon after PyObject_HEAD (#16123) 2024-11-27 10:08:21 -08:00
free_threading_mutex.h Python Proto Free Threading tests/experimental 2025-11-21 13:41:46 -08:00
lazy_unique_ptr.h Fix data race in CMessage lazy initialization for Python freethreading. 2026-03-30 07:23:10 -07:00
map_container.cc Python: fix heap-use-after-free in MapIterator after map.clear() (#27257) 2026-06-28 13:43:09 -07:00
map_container.h [py/C++] Implement Make GetOptions() return immutable options. C++ will raise a TypeError when options returned GetOptions() by is mutated. 2026-06-03 13:10:50 -07:00
message.cc [Py/C++] Fixed data race in Python free threading by removing obsolete hack 2026-08-19 08:59:26 -07:00
message.h Emit future warning when mutating GetOptions() in OSS 2026-07-12 13:41:24 -07:00
message_factory.cc Fixed race in GetMessageClass/RegisterMessageClass under free threading. 2026-05-08 10:47:54 -07:00
message_factory.h Fixed race in GetMessageClass/RegisterMessageClass under free threading. 2026-05-08 10:47:54 -07:00
message_module.cc Add UPB support for FileDescriptorProto.option_dependency. 2026-07-13 10:43:20 -07:00
python.proto Shorten our license headers into an abbreviated form that references LICENSE instead of including it in full. 2023-09-08 17:59:33 -07:00
README down integrate python opensource to svn 2014-08-12 21:10:30 +00:00
repeated_composite_container.cc Emit future warning when mutating GetOptions() in OSS 2026-07-12 13:41:24 -07:00
repeated_composite_container.h Shorten our license headers into an abbreviated form that references LICENSE instead of including it in full. 2023-09-08 17:59:33 -07:00
repeated_scalar_container.cc Replace calls of Reflection::GetEnum/GetRepeatedEnum with GetEnumValue/GetRepeatedEnumValue when we only care about the value. 2026-07-21 08:49:12 -07:00
repeated_scalar_container.h Shorten our license headers into an abbreviated form that references LICENSE instead of including it in full. 2023-09-08 17:59:33 -07:00
safe_numerics.h Shorten our license headers into an abbreviated form that references LICENSE instead of including it in full. 2023-09-08 17:59:33 -07:00
scoped_pyobject_ptr.h Fixed data race when accessing Python fields in free threaded builds. 2026-03-16 10:28:49 -07:00
unknown_field_set.cc [py/C++] Implement Make GetOptions() return immutable options. C++ will raise a TypeError when options returned GetOptions() by is mutated. 2026-06-03 13:10:50 -07:00
unknown_field_set.h [python] Remove semicolon after PyObject_HEAD (#16123) 2024-11-27 10:08:21 -08:00
weak_value_map.cc [Py/FreeThreading] Fixed remaining race conditions in Dealloc() 2026-07-22 12:43:18 -07:00
weak_value_map.h [Py/FreeThreading] Fixed remaining race conditions in Dealloc() 2026-07-22 12:43:18 -07:00

This is the 'v2' C++ implementation for python proto2.

It is active when:

PROTOCOL_BUFFERS_PYTHON_IMPLEMENTATION=cpp
PROTOCOL_BUFFERS_PYTHON_IMPLEMENTATION_VERSION=2