Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(framework:skip) Specify keyword deterministic in SerializeToString method #4163

Merged
merged 4 commits into from
Sep 10, 2024

Conversation

panh99
Copy link
Contributor

@panh99 panh99 commented Sep 9, 2024

Motivation

As explained in google protobuf documentation, the SerializeToString method only accept keyword arguments. In some settings, as spotted by Robert and Danny, the following exception will be raised when calling SerializeToString(True), i.e., a positional argument instead of a keyword argument is passed.

TypeError: _AddSerializeToStringMethod.<locals>.SerializeToString() takes 1 positional argument but 2 were given

Solution

Change SerializeToString(True) to SerializeToString(deterministic=True).

@panh99 panh99 marked this pull request as ready for review September 9, 2024 11:54
@danieljanes danieljanes enabled auto-merge (squash) September 9, 2024 18:48
@danieljanes danieljanes disabled auto-merge September 9, 2024 18:49
@danieljanes danieljanes marked this pull request as draft September 9, 2024 18:50
@panh99 panh99 marked this pull request as ready for review September 10, 2024 08:16
Copy link
Member

@tanertopal tanertopal left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lgtm!

@tanertopal tanertopal merged commit 375d259 into main Sep 10, 2024
33 checks passed
@tanertopal tanertopal deleted the fix-grpc-serialization-issue branch September 10, 2024 10:36
charlesbvll pushed a commit that referenced this pull request Sep 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants