-
Notifications
You must be signed in to change notification settings - Fork 37
fix: construct messages with nested duration in protobuf 5.28+ #519
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
Conversation
81cd01d
to
d851c1c
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for fixing this! Only minor comments.
@@ -241,6 +241,26 @@ class Foo(proto.Message): | |||
assert Foo.pb(foo).ttl.seconds == 120 | |||
|
|||
|
|||
def test_duration_write_string_nested(): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: for clarity, I suggest:
s/another_field
/foo_field
/g
s/some_field
/bar_field
/g
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed in fcb5bb2
Co-authored-by: Victor Chudnovsky <[email protected]>
Co-authored-by: Victor Chudnovsky <[email protected]>
This fix is similar to #479 where message construction fails when a specific type, in this case
google.protobuf.duration_pb2.Duration
, is nested.Fixes #518
Fixes googleapis/google-cloud-python#13350