|
| 1 | ++++ |
| 2 | +title = "Changes announced on December 13, 2023" |
| 3 | +linkTitle = "December 13, 2023" |
| 4 | +toc_hide = "true" |
| 5 | +description = "Changes announced for Protocol Buffers on December 13, 2023." |
| 6 | +type = "docs" |
| 7 | ++++ |
| 8 | + |
| 9 | +## C++ Breaking Changes |
| 10 | + |
| 11 | +In v26, we are planning a major version bump for C++ as per our |
| 12 | +[breaking changes policy](/news/2022-07-06) and |
| 13 | +[version support policy](/support/version-support#python-support). |
| 14 | + |
| 15 | +The following sections outline the set of breaking changes that we plan to |
| 16 | +include in the 26.0 release of protocol buffers. Note that plans can and do |
| 17 | +change. These are potential breaking changes to be aware of, but they may not |
| 18 | +happen in this particular release, or they may not happen at all. |
| 19 | + |
| 20 | +### Remove deprecated clear APIs on repeated fields |
| 21 | + |
| 22 | +The following deprecated methods are removed: |
| 23 | + |
| 24 | +* `RepeatedPtrField::ReleaseCleared()` |
| 25 | +* `RepeatedPtrField::ClearedCount()` |
| 26 | +* `RepeatedPtrField::AddCleared()` |
| 27 | + |
| 28 | +### Remove C++ legacy syntax descriptor APIs |
| 29 | + |
| 30 | +With the release of [editions](/editions), syntax is no |
| 31 | +longer supported for business logic. Instead, use the various feature helpers |
| 32 | +defined in |
| 33 | +[`descriptor.h`](/reference/cpp/api-docs/google.protobuf.descriptor) |
| 34 | +to query more targeted behaviors, such as |
| 35 | +[`has_presence`](/reference/cpp/api-docs/google.protobuf.descriptor#FieldDescriptor.has_presence.details), |
| 36 | +to query features in C++. |
| 37 | + |
| 38 | +### Remove deprecated syntax accessor |
| 39 | + |
| 40 | +We plan to remove the deprecated syntax accessor, `FileDescriptor::Syntax`, in |
| 41 | +v26. We recommend using the getters from `FileDescriptor::edition` instead. |
| 42 | + |
| 43 | +### Remove deprecated SupportsUnknownEnumValues method |
| 44 | + |
| 45 | +The `SupportsUnknownEnumValues` method was |
| 46 | +[deprecated in March, 2023](https://github.com/protocolbuffers/protobuf/pull/12129). |
| 47 | +We plan to remove it in v26. |
| 48 | + |
| 49 | +### Remove std::string error collector overrides |
| 50 | + |
| 51 | +We are planning to remove the deprecated `std::string` methods in error |
| 52 | +collectors. |
| 53 | + |
| 54 | +## Python Breaking Changes |
| 55 | + |
| 56 | +In v26, we are planning a major version bump for Python as per our |
| 57 | +[breaking changes policy](/news/2022-07-06) and |
| 58 | +[version support policy](/support/version-support#python-support). |
| 59 | + |
| 60 | +### Timestamps are checked for validity |
| 61 | + |
| 62 | +In v26, the system will check if `Timestamp` values are valid. Seconds must be |
| 63 | +in the range [-62135596800, 253402300799] and nanos must be in range [0, |
| 64 | +999999999]. Values outside those ranges will raise an exception. |
| 65 | + |
| 66 | +### Remove deprecated syntax accessor |
| 67 | + |
| 68 | +We plan to remove the deprecated syntax accessor, `FileDescriptor.syntax`, in |
| 69 | +v26. We plan to add `FileDescriptor.edition` in its place. |
| 70 | + |
| 71 | +### UnknownFields support removal |
| 72 | + |
| 73 | +In v25 |
| 74 | +[`message.UnknownFields()`](https://googleapis.dev/python/protobuf/latest/google/protobuf/message.html#google.protobuf.message.Message.UnknownFields) |
| 75 | +was deprecated in pure Python and C++ extensions. We plan to remove it v26. Use |
| 76 | +the new |
| 77 | +[`UnknownFieldSet(message)`](https://googleapis.dev/python/protobuf/latest/google/protobuf/unknown_fields.html) |
| 78 | +support in `unknown_fields.py` as a replacement. |
| 79 | + |
| 80 | +More details about all of these changes will be available in the corresponding |
| 81 | +release notes. |
0 commit comments