@@ -10,7 +10,8 @@ The following announcements are specific to Version 30.x. For information
1010presented chronologically, see [ News] ( /news ) .
1111
1212The following sections cover planned breaking changes in the v30 release,
13- expected in 2025 Q1. These describe changes as we anticipate them being
13+ expected in 2025 Q1. Also included are some changes that aren't breaking but may
14+ require action on your part. These describe changes as we anticipate them being
1415implemented, but due to the flexible nature of software some of these changes
1516may not land or may vary from how they are described in this topic.
1617
@@ -84,9 +85,25 @@ This release will drop C++ 14 as the minimum supported version and raise it to
848517, as per the
8586[ Foundational C++ Support matrix] ( https://github.com/google/oss-policies-info/blob/main/foundational-cxx-support-matrix.md ) .
8687
87- Per [ our policies] ( https://protobuf.dev/support/version-support/ ) , we do not
88+ Per [ our policies] ( https://protobuf.dev/support/version-support ) , we do not
8889consider this to be a breaking change.
8990
91+ ## Introduce ASAN Poisoning After Clearing Oneof Messages on Arena
92+
93+ This change adds a hardening check that affects C++ protobufs using Arenas.
94+ Oneof messages allocated on the protobuf arena will now be cleared in debug and
95+ poisoned in ASAN mode. After calling clear, future attempts to use the memory
96+ region will cause a crash in ASAN as a use-after-free error.
97+
98+ This implementation requires C++17.
99+
100+ ## Dropping our C++ CocoaPods release
101+
102+ In v30, we will be dropping our C++ CocoaPods release, which has been broken
103+ since v4.x.x. C++ users should use our
104+ [ GitHub release] ( https://github.com/protocolbuffers/protobuf/releases ) directly
105+ instead.
106+
90107## Changes in JRuby {#jruby}
91108
92109v30 will flip the default implementation for JRuby to FFI, which may be breaking
@@ -120,6 +137,15 @@ Python's and upb's field setters will be fixed in v30 to validate closed enums
120137under edition 2023. Closed enum fields updated with invalid values will generate
121138errors.
122139
140+ ### Remove Deprecated py_proto_library Macro
141+
142+ The deprecated internal ` py_proto_library ` Bazel macro in ` protobuf.bzl ` will be
143+ removed in v30.x.
144+
145+ This should be replaced by the official ` py_proto_library ` which will be moved
146+ to protobuf in ` bazel/py_proto_library ` as of v29.x. This implementation was
147+ previously available in ` rules_python ` prior to v29.x.
148+
123149### Remove Deprecated APIs {#python-remove-apis}
124150
125151v30 will remove the following public runtime APIs, which have been marked
170196No replacement. It's only in Python C++ which is no longer released. It is not
171197supported in pure Python or UPB.
172198
199+ ### Python setdefault Behavior Change for Map Fields
200+
201+ Starting in v30, ` setdefault ` will be similar to ` dict ` for ` ScalarMap ` , except
202+ that both key and value must be set. ` setdefault ` will be rejected for
203+ ` MessageMaps ` .
204+
205+ ## Python Nested Message Class \_\_ qualname\_\_ Contains the Outer Message Name
206+
207+ Python nested message class ` __qualname__ ` now contains the outer message name.
208+ Prior to v30, ` __qualname__ ` has the same result with ` __name__ ` for nested
209+ message, in that the outer message name was not included.
210+
211+ For example:
212+
213+ ``` python
214+ message Foo {
215+ message Bar {
216+ bool bool_field = 1 ;
217+ }
218+ }
219+ nested = test_pb2.Foo.Bar()
220+ self .assertEqual(' Bar' , nested.__class__ .__name__ )
221+ self .assertEqual(' Foo.Bar' , nested.__class__ .__qualname__ ) # It was 'Bar' before
222+ ```
223+
173224## Changes in Objective-C {#objc}
174225
175226** This will be the first breaking release for Objective-C** .
@@ -324,3 +375,12 @@ runtime but warn of upcoming breakage against 6.x.x runtime.
324375v30 will includes a fix to make UTF-8 enforcement consistent across languages.
325376Users with bad non-UTF8 data in string fields may see surfaced UTF-8 enforcement
326377errors earlier.
378+
379+ ## Ruby and PHP Errors in JSON Parsing
380+
381+ v30 fixes non-conformance in JSON parsing of strings in numeric fields per the
382+ [ JSON spec] ( https://protobuf.dev/programming-guides/json/ ) .
383+
384+ This fix will not be accompanied by a major version bump, but Ruby and PHP will
385+ now raise errors for non-numeric strings (e.g. "", "12abc", "abc") in numeric
386+ fields. v29.x will include a warning for these error cases.
0 commit comments