|
| 1 | + |
| 2 | + |
| 3 | ++++ |
| 4 | +title = "Changes Announced on October 15, 2026" |
| 5 | +linkTitle = "October 15, 2026" |
| 6 | +toc_hide = "true" |
| 7 | +description = "Changes announced for Protobuf on October 15, 2026." |
| 8 | +type = "docs" |
| 9 | ++++ |
| 10 | + |
| 11 | +The following sections cover additional planned breaking changes in the v38 |
| 12 | +release, expected in 2027 Q1. These describe changes as we anticipate them being |
| 13 | +implemented, but due to the flexible nature of software some of these changes |
| 14 | +may not land or may vary from how they are described in this topic. |
| 15 | + |
| 16 | +## Changes in C++ {#cpp} |
| 17 | + |
| 18 | +### Remove NULL Termination in Descriptor Names |
| 19 | + |
| 20 | +Descriptor APIs that return `absl::string_view` will no longer guarantee null |
| 21 | +termination. The null terminators are being removed to achieve memory savings in |
| 22 | +descriptors. |
| 23 | + |
| 24 | +This change applies to descriptor methods that return `absl::string_view`. |
| 25 | +Callers must not assume that the pointer returned by `.data()` is |
| 26 | +null-terminated. If a null-terminated C-style string is required, callers should |
| 27 | +explicitly construct a `std::string` (for example, `std::string(desc->name())`) |
| 28 | +or migrate to APIs that accept `absl::string_view` directly. |
| 29 | + |
| 30 | +## Changes in Protoc {#protoc} |
| 31 | + |
| 32 | +### Disallow Conflicting Descriptors in `--descriptor_set_in` |
| 33 | + |
| 34 | +Protoc will error when conflicting file descriptors are provided via |
| 35 | +`--descriptor_set_in`. |
| 36 | + |
| 37 | +Protoc introduced a warning when conflicting descriptors are detected across |
| 38 | +input sets. In the v38 release, this warning becomes an error. Build systems and |
| 39 | +callers must ensure that descriptor sets fed to `--descriptor_set_in` do not |
| 40 | +provide conflicting definitions for the same `.proto` file. |
| 41 | + |
| 42 | +## Changes in Python {#python} |
| 43 | + |
| 44 | +### Align `__eq__()` with `Any` Fields on Pure Python with Py-upb Behavior |
| 45 | + |
| 46 | +Align pure PythonProto `__eq__()` behavior to upb by only comparing the |
| 47 | +serialized bytes. There are some edge cases where two `Any` fields may contain |
| 48 | +different bytes which are equal only when parsed. These cases used to return |
| 49 | +`true`, but will now return `false`. |
| 50 | + |
| 51 | +## Changes in UPB {#upb} |
| 52 | + |
| 53 | +### Align Default Value Float and Double Formatting with C++ `FileDescriptor::CopyTo` |
| 54 | + |
| 55 | +In `upb_FileDef_ToProto`, `float` and `double` default values in |
| 56 | +`FieldDescriptorProto.default_value` were previously formatted using hardcoded |
| 57 | +`"%.9g"` and `"%.17g"`. This could produce more digits than C++ |
| 58 | +`FieldDescriptor::DefaultValueAsString()` (`io::SimpleFtoa` / `io::SimpleDtoa`), |
| 59 | +causing `upb_FileDef_ToProto` output to differ from C++ `FileDescriptor::CopyTo` |
| 60 | +(for example, `"0.10000000000000001"` vs `"0.1"` for `double`, and |
| 61 | +`"7.77777779e+35"` vs `"7.777778e+35"` for `float`). |
| 62 | + |
| 63 | +In v38, `upb_FileDef_ToProto` will format `float` and `double` default values |
| 64 | +using round-trip formatting matching `io::SimpleFtoa` and `io::SimpleDtoa`. |
0 commit comments