Repository navigation
Conversation
Avoid calling ByteSize() separately in serialize_length_prefixed(). The serialized payload already carries the exact length to prefix, so this keeps behavior intact while avoiding a duplicate serialization-sized pass. Tested: bazelisk --output_user_root=/tmp/bazel-protobuf test //python:proto_test
JasonLunn
approved these changes
May 15, 2026
tonyliaoss
reviewed
May 28, 2026
| def test_serialize_length_prefixed_serializes_once(self, message_module): | ||
| del message_module | ||
|
|
||
| class CountingMessage: |
Member
There was a problem hiding this comment.
Looks like this part hit a snag when we are trying to import it due to pytype checks failing in our internal tests.
Could you rephrase this to
from google.protobuf import message
...
class CountingMessage(message.Message):
instead and rebase? Thanks!
Member
|
Let me just patch it manually -- saves a bit of turnaround time. Standby... In a few moments, if everything goes well, this PR should be auto closed and the original author @Zaczero should still be attributed. |
Member
|
(Progress can be tracked at #27652) We will need to run an exhaustive test suite internally, so expect it to take at least 24 hours. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Avoid calling ByteSize() separately in serialize_length_prefixed(). The serialized payload already carries the exact length to prefix, so this keeps behavior intact while avoiding a duplicate serialization-sized pass.