Changes announced on December 13, 2023
C++ Breaking Changes
In v26, we are planning a major version bump for C++ as per our breaking changes policy and version support policy.
The following sections outline the set of breaking changes that we plan to include in the 26.0 release of protocol buffers. Note that plans can and do change. These are potential breaking changes to be aware of, but they may not happen in this particular release, or they may not happen at all.
Remove deprecated clear APIs on repeated fields
The following deprecated methods are removed:
RepeatedPtrField::ReleaseCleared()
RepeatedPtrField::ClearedCount()
RepeatedPtrField::AddCleared()
Remove C++ legacy syntax descriptor APIs
With the release of editions, syntax is no
longer supported for business logic. Instead, use the various feature helpers
defined in
descriptor.h
to query more targeted behaviors, such as
has_presence
,
to query features in C++.
Remove deprecated syntax accessor
We plan to remove the deprecated syntax accessor, FileDescriptor::Syntax
, in
v26. We recommend using the getters from FileDescriptor::edition
instead.
Remove deprecated SupportsUnknownEnumValues method
The SupportsUnknownEnumValues
method was
deprecated in March, 2023.
We plan to remove it in v26.
Remove std::string error collector overrides
We are planning to remove the deprecated std::string
methods in error
collectors.
Python Breaking Changes
In v26, we are planning a major version bump for Python as per our breaking changes policy and version support policy.
Timestamps are checked for validity
In v26, the system will check if Timestamp
values are valid. Seconds must be
in the range [-62135596800, 253402300799] and nanos must be in range [0,
999999999]. Values outside those ranges will raise an exception.
Remove deprecated syntax accessor
We plan to remove the deprecated syntax accessor, FileDescriptor.syntax
, in
v26. We plan to add FileDescriptor.edition
in its place.
UnknownFields support removal
In v25
message.UnknownFields()
was deprecated in pure Python and C++ extensions. We plan to remove it v26. Use
the new
UnknownFieldSet(message)
support in unknown_fields.py
as a replacement.
More details about all of these changes will be available in the corresponding release notes.