v36.0-rc1
Protocol Buffers v36.0-rc1
Release Notes
Announcements
- Protobuf News may include additional announcements or pre-announcements for upcoming changes.
Bazel
- Add Bazel9 test (https://github.com/protocolbuffers/protobuf/commit/90ad7e978849e11406eeb47baf228b099c5da9d0)
- Bazel 9 tests for csharp, hpb, objc, php, python, rust and upb (https://github.com/protocolbuffers/protobuf/commit/f9e028f29fa83d0fcfb01c19ce0a4635e9beff5c)
Compiler
- Make default_symbol_visibility STRICT in edition 2026 (https://github.com/protocolbuffers/protobuf/commit/fcd68c563cf2be486622a118caaf8c5f3858f744)
- Add deprecation warnings for (py|cc|java)_generic_service. (https://github.com/protocolbuffers/protobuf/commit/517be42cfe43c9e2c69f5ee40e437a9d8cbd3f99)
- Disallow reserving field number INT_MAX. (https://github.com/protocolbuffers/protobuf/commit/933c522f9e9a09d30f370dc885640af248e52469)
- Add bazel targets for standalone plugin binaries (#23919) (https://github.com/protocolbuffers/protobuf/commit/81880fad1673797b6326a91582b2bf77069d505d)
- Feat:
--<lang>_prefixcli option (#24824) (https://github.com/protocolbuffers/protobuf/commit/92dd27ccf0c5c674b48de48310e0ebf45d0d5b88) - Enforce proto limits in the descriptor by default for EDITION_2026. (https://github.com/protocolbuffers/protobuf/commit/d8520d93af2aadf99afcb5e17bfb99c14ad57364)
- Fix: Apply path traversal guard to WriteAllToZip() matching WriteAllToDisk() (#27171) (https://github.com/protocolbuffers/protobuf/commit/28bef9809e4d1f5f3b6da2a4a26a3bd5b488136b)
- Add an
enforce_proto_limitsfeature which will be implemented in Edition 2026. (https://github.com/protocolbuffers/protobuf/commit/5ddd5244f7a04539e59f97fbc0c0df02334d0b12)
C++
- Util: validate Duration/Timestamp in TimeUtil::FromString against spec limits (#27443) (https://github.com/protocolbuffers/protobuf/commit/e33749537254d42895ef084e482faaba230fddc2)
- Make default_symbol_visibility STRICT in edition 2026 (https://github.com/protocolbuffers/protobuf/commit/fcd68c563cf2be486622a118caaf8c5f3858f744)
- Support assigning repeated scalar fields using Python Buffer API. (https://github.com/protocolbuffers/protobuf/commit/ea40f1d32a5e67b996ee487c1976e11535963cdc)
- Automated rollback of commit c8c5974fa928bf5c8752462119128e5e07a07919. (https://github.com/protocolbuffers/protobuf/commit/21ccdec2ffc6c5d21e5eac8efbe4bf14fa0516ed)
- Use the direct map reflection API when converting message to JSON, if the repeated field reflection is not valid. (https://github.com/protocolbuffers/protobuf/commit/e75aac33c3615d22d0cba61e8f9d92939a39a73f)
- [py/upb] Make GetOptions() return immutable options for scalar type. UPB will raise a TypeError when options returned GetOptions() by is mutated. (https://github.com/protocolbuffers/protobuf/commit/403d429eab9355a861fd20c1ddecf34c065e3533)
- Add bazel targets for standalone plugin binaries (#23919) (https://github.com/protocolbuffers/protobuf/commit/81880fad1673797b6326a91582b2bf77069d505d)
- Fix(cpp): stop TextFormat iteration if output stream fails (#26237) (https://github.com/protocolbuffers/protobuf/commit/2718dd5f3dda891f7e0224e5f50aa946219499ff)
- Enforce proto limits in the descriptor by default for EDITION_2026. (https://github.com/protocolbuffers/protobuf/commit/d8520d93af2aadf99afcb5e17bfb99c14ad57364)
- Add an
enforce_proto_limitsfeature which will be implemented in Edition 2026. (https://github.com/protocolbuffers/protobuf/commit/5ddd5244f7a04539e59f97fbc0c0df02334d0b12) - Workaround for attribute handling bug in gcc < 13 (https://github.com/protocolbuffers/protobuf/commit/ba10a4e179fa6cd0cbe4597f6fd19c1b3442c5bd)
- Fix confusing error message for map value type name conflicts (https://github.com/protocolbuffers/protobuf/commit/7864b8534c4425ac98eee69b57600fd15ea8bf9b)
- C++Proto JSON: Align behavior on the type.proto path with the descriptor.proto path (https://github.com/protocolbuffers/protobuf/commit/0bc1f14c966a6714f757cdebf9dcc1f2ec3bb928)
Java
- Add a warning for potential OneofDescriptor collisions prior to Q1 2027 breaking changes. (https://github.com/protocolbuffers/protobuf/commit/ab6983138057ae4e2bc7ce4a7e8d853d5403913a)
- Make default_symbol_visibility STRICT in edition 2026 (https://github.com/protocolbuffers/protobuf/commit/fcd68c563cf2be486622a118caaf8c5f3858f744)
- Reject negative size in mergeDelimitedFrom (#28097) (https://github.com/protocolbuffers/protobuf/commit/c56cd5b4417249e091ccce3739b4e4176ac33403)
- Add deprecation warnings for (py|cc|java)_generic_service. (https://github.com/protocolbuffers/protobuf/commit/517be42cfe43c9e2c69f5ee40e437a9d8cbd3f99)
- Update Java protobuf generator to use Objects.requireNonNull (https://github.com/protocolbuffers/protobuf/commit/31ef11cb59a269acf8a20aa40373ae5c59a30a9f)
- Use natural String comparison instead of UTF-8 ByteString comparison for sorting map keys in JsonFormat. (https://github.com/protocolbuffers/protobuf/commit/ae1faeedfd57b2cdc4c26e7befe4d34138210494)
- Add option to enable strict JSON parsing in Protobuf Java JsonFormat. (https://github.com/protocolbuffers/protobuf/commit/40825a1df7f87857560a03bf901fdd7649930010)
- Add bazel targets for standalone plugin binaries (#23919) (https://github.com/protocolbuffers/protobuf/commit/81880fad1673797b6326a91582b2bf77069d505d)
- Remove experimental FieldOrder enum. (https://github.com/protocolbuffers/protobuf/commit/ec52338ef068245df952ecbfcfee8ad3fb44a180)
- Optimize GeneratedMessage.ExtendableBuilder to avoid temporary allocations when merging empty extendable messages. (https://github.com/protocolbuffers/protobuf/commit/a37dbd643372b05de834190941671a1563d7e499)
- Stop using sun.misc.Unsafe in isValidUtf8 paths. (https://github.com/protocolbuffers/protobuf/commit/421d7451ef41e158cd1ec3b84709de4018500b82)
- Use
String#encodedLengthon JDK versions that support it (https://github.com/protocolbuffers/protobuf/commit/efca121a668ecc73ca010c9457ba35bf189c01ec) - Add an
enforce_proto_limitsfeature which will be implemented in Edition 2026. (https://github.com/protocolbuffers/protobuf/commit/5ddd5244f7a04539e59f97fbc0c0df02334d0b12) - Java: limit numeric string length before BigDecimal parsing (#26908) (https://github.com/protocolbuffers/protobuf/commit/25e7005814c4b2dd1cd21519c6cf116380a5ad21)
- Validate java package and class against injection risks. (https://github.com/protocolbuffers/protobuf/commit/f8514d8c42af41fbaaa73cd095e5e16cf347a23f)
Csharp
- Make default_symbol_visibility STRICT in edition 2026 (https://github.com/protocolbuffers/protobuf/commit/fcd68c563cf2be486622a118caaf8c5f3858f744)
- Advertise that C# supports Edition 2026, and move C# Nullable Reference Type support into that edition. (https://github.com/protocolbuffers/protobuf/commit/a1f718cdd7703878f35a521cfdb019bc8e129004)
- First implementation of C# nullable reference types enablement using the current (unreleased) edition. (https://github.com/protocolbuffers/protobuf/commit/7a732d1fb803e2c8df600838e554ac3ebeb0c7ef)
- Add bazel targets for standalone plugin binaries (#23919) (https://github.com/protocolbuffers/protobuf/commit/81880fad1673797b6326a91582b2bf77069d505d)
- Csharp: propagate recursion depth into JsonReplayTokenizer to honor Any nesting limit (#26835) (https://github.com/protocolbuffers/protobuf/commit/cee45bff13ca18981453b170ea1725d0119e858f)
- Fix
csharpstring interpolation inTimestamp.ToDateTime()exception message (#26341) (https://github.com/protocolbuffers/protobuf/commit/a29828239fcef702b485dddae09e13306b23fcd1)
Objective-C
- Add bazel targets for standalone plugin binaries (#23919) (https://github.com/protocolbuffers/protobuf/commit/81880fad1673797b6326a91582b2bf77069d505d)
- [ObjC] Add DEBUG-only validations to extension values in GPBMessage, along with tests. (https://github.com/protocolbuffers/protobuf/commit/290a5376ce07716d12c3035742760a2d88f2072d)
Rust
- Remove -release suffix from Rust Crates.io release if minor version >= 36 (https://github.com/protocolbuffers/protobuf/commit/e7b3391b436adf78d3cd4b8a972b397b7ead32b1)
- Add bazel targets for standalone plugin binaries (#23919) (https://github.com/protocolbuffers/protobuf/commit/81880fad1673797b6326a91582b2bf77069d505d)
- RustProto: Add the ability to iterate over the muts of a repeated message-typed field. (https://github.com/protocolbuffers/protobuf/commit/70590a527ee1929a3834a0e749d513635a2a091d)
- See also UPB changes below, which may affect Rust.
Python
- Configure extra compile args in setup.py (#28264) (https://github.com/protocolbuffers/protobuf/commit/3aa022a269f193025f8288cd89e96075c08fea2f)
- Python: fix heap-use-after-free in MapIterator after map.clear() (#27257) (https://github.com/protocolbuffers/protobuf/commit/9e9dbae858f75c8b886f1aea642418150cb8aed0)
- Add PyDescriptorPool_FromSharedPool(std::shared_ptr) API (https://github.com/protocolbuffers/protobuf/commit/abdf212e92115bda18485e606a79c073e4d462de)
- Fix memory leak in PyUpb_Descriptor_GetExtensionRanges (https://github.com/protocolbuffers/protobuf/commit/3d31b0f7866af9b20ec2c61d414ceee10689a882)
- Warn on out-of-range pop index in upb repeated fields. (https://github.com/protocolbuffers/protobuf/commit/a70d12186520fabc0a5a1266cc8ec9e1981a9a80)
- Support assigning repeated scalar fields using Python Buffer API. (https://github.com/protocolbuffers/protobuf/commit/ea40f1d32a5e67b996ee487c1976e11535963cdc)
- Fix Pure Python
map<string, ...>key handling forbyteslookups. (https://github.com/protocolbuffers/protobuf/commit/156a0b8dfc805fbe12e450683c4687f0a9a426f1) - Change Python DescriptorDatabase FindFileContainingSymbol() to accept leading "." to match DescriptorPool and other languages (https://github.com/protocolbuffers/protobuf/commit/e86e536349fae60486f12a4b6fdb893e49ca520c)
- Faster Python cpp protos assignment to bytes/string fields. (https://github.com/protocolbuffers/protobuf/commit/593ab176d6f0dcf5e37ea78d71e88cdd197ae219)
- Serialize length-prefixed protos once (#27252) (https://github.com/protocolbuffers/protobuf/commit/e090f8ae778cb3513ee2ecb25bbd015ef1bbe6de)
- [py/upb] Make GetOptions() return immutable options for scalar type. UPB will raise a TypeError when options returned GetOptions() by is mutated. (https://github.com/protocolbuffers/protobuf/commit/403d429eab9355a861fd20c1ddecf34c065e3533)
- Add bazel targets for standalone plugin binaries (#23919) (https://github.com/protocolbuffers/protobuf/commit/81880fad1673797b6326a91582b2bf77069d505d)
- Add mutex protection to DescriptorPool caches. (https://github.com/protocolbuffers/protobuf/commit/cecbbf41e43634c7c5b940dd336aa81b31fd4e5d)
- Refactor container comparison function in py/C++ and py/upb to return enum instead of integer. (https://github.com/protocolbuffers/protobuf/commit/c857f492242f889b2a5551b50e309d927cb77b57)
- Py JSON: Fix issue with depth enforcement on Struct/Value WKT paths. (https://github.com/protocolbuffers/protobuf/commit/cfcc4337aee2ce3a584210320152ae0c97c86894)
- Fix RepeatedContainer_pop to raise IndexError for out-of-bounds indices. (https://github.com/protocolbuffers/protobuf/commit/78a09ada5c0d2668e1e0aa7cab4ec88d3b33fcd9)
PHP
- PHP - Add configurable recursion_limit to mergeFromString / serializeToString (#27874) (https://github.com/protocolbuffers/protobuf/commit/5c5ee3c9c739f4a1c9b119a0eb4e1eab4d1cc6d0)
- Add bazel targets for standalone plugin binaries (#23919) (https://github.com/protocolbuffers/protobuf/commit/81880fad1673797b6326a91582b2bf77069d505d)
- Clarify FieldMask JSON warnings/errors in the situation of fields which aren't round-trip representable in JSON format. (https://github.com/protocolbuffers/protobuf/commit/0488596867d7a055467e469419146df1ac20a4b6)
- Add an
enforce_proto_limitsfeature which will be implemented in Edition 2026. (https://github.com/protocolbuffers/protobuf/commit/5ddd5244f7a04539e59f97fbc0c0df02334d0b12)
PHP C-Extension
- PHP - Add configurable recursion_limit to mergeFromString / serializeToString (#27874) (https://github.com/protocolbuffers/protobuf/commit/5c5ee3c9c739f4a1c9b119a0eb4e1eab4d1cc6d0)
- See also UPB changes below, which may affect PHP C-Extension.
Ruby
- Add bazel targets for standalone plugin binaries (#23919) (https://github.com/protocolbuffers/protobuf/commit/81880fad1673797b6326a91582b2bf77069d505d)
UPB (Python/PHP/Ruby C-Extension)
- Avoid UB in upb by switching to the XCT section, which will run our constructors before the compiler-generated initializers. (https://github.com/protocolbuffers/protobuf/commit/58e5ac879bdf42316c1d6a7b8618e5c31d87360f)
- [py/upb] Make GetOptions() return immutable options for scalar type. UPB will raise a TypeError when options returned GetOptions() by is mutated. (https://github.com/protocolbuffers/protobuf/commit/403d429eab9355a861fd20c1ddecf34c065e3533)
- Bazel 9 tests for csharp, hpb, objc, php, python, rust and upb (https://github.com/protocolbuffers/protobuf/commit/f9e028f29fa83d0fcfb01c19ce0a4635e9beff5c)
- Clarify FieldMask JSON warnings/errors in the situation of fields which aren't round-trip representable in JSON format. (https://github.com/protocolbuffers/protobuf/commit/0488596867d7a055467e469419146df1ac20a4b6)
- Fixed two GCC-only issues around upb's generated extension registry. (https://github.com/protocolbuffers/protobuf/commit/d56b385bd602002a317e7fb92e458b1b15b9d163)
- Fix RepeatedContainer_pop to raise IndexError for out-of-bounds indices. (https://github.com/protocolbuffers/protobuf/commit/78a09ada5c0d2668e1e0aa7cab4ec88d3b33fcd9)
Other
- Add deprecation warning for internal_py_proto_library prior to Q1 2027 breaking changes. (https://github.com/protocolbuffers/protobuf/commit/a8d0be3d42e166b642358c7009ee649946b69f63)
- Update Bazel CI presubmit matrix (https://github.com/protocolbuffers/protobuf/commit/b3875ccdf6a4953cfabd213fe7b509728958aa73)