Hey guys,
We're using Java(protobuf-java:3.21.7)[Everything works fine there] and
Python in our projects
I've encountered a weird problem in Python after moving to any version
above 3.19.4 we couldn't use the well known types such as Int32Value,
StringValue and more.
the import(working in version *3.19.4*):
from google.protobuf.wrappers_pb2 import Int32Value
example of usage(Working in version *3.19.4*):
response = stub.GetData(Int32Value(value=int(data_id)),
metadata=[('account_id', account_id)])
when upgrading to *3.20.0 *or above it seems like the import doesn't work
anymore and that the ide can't find these well known types(according to:
https://protobuf.dev/reference/protobuf/google.protobuf/ ) in the
protobuf library at all.
(Looked everywhere in the package and couldn't find it).
The proto part that works in *3.19.4 *looks like this:
service DataService{
rpc GetData(google.protobuf.Int32Value) returns (Data){};
Is there another way to use the google built in .proto files wrappers(In
python) of well known types?
The answer in the thread attached didn't help us(The example sent in the
post there doesn't contain the wrappers for string, int etc):
https://groups.google.com/g/protobuf/c/B0lNTTLZZdA?pli=1
--
--------------------------------------
The content of this email is
confidential and intended for the recipient specified in message only. It
is strictly forbidden to share any part of this message with any third
party, without a written consent of the sender. If you received this
message by mistake, please reply to this message and follow with its
deletion, so that we can ensure such a mistake does not occur in the future.
--
You received this message because you are subscribed to the Google Groups
"Protocol Buffers" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/protobuf/96270bf3-166f-4458-aebd-61f99599b9f4n%40googlegroups.com.