Hi all,
First off, thanks a lot to the gRPC developers - it's a great piece of
technology you've created.
I am looking for some guidance regarding the compatibility of the generated
Python code across gRPC and / or protobuf versions:
I had previously used the generated C++ code, which checks that the current
version of gRPC and the one the files were generated with were compatible.
As a result, I assumed best practice was to always keep them the same.
Looking now at the generated Python code however, it seems that it's only
using the public gRPC API. Does this mean that it is possible to use Python
files generated with a different version of gRPC and / or protobuf than the
currently installed one? If yes, is that an actual design goal of the
Python code generator, or merely working by accident?
In the setup.py for grpcio-tools, I found the following:
install_requires=[
'protobuf>=3.5.0.post1, < 4.0dev',
'grpcio>={version}'.format(version=grpc_version.VERSION),
'setuptools',
],
which seems to imply that the gRPC version simply needs to be newer than
the _pb2.py.
To give some context, the reason I am interested in this compatibility is
that I would like to publish a library which works with different versions
of gRPC. While building the _pb2.py at install time is an option, it's
difficult with pip's build isolation to guarantee that the installed gRPC
is the same version used to build the wheel, without pinning both.
Thank you and best regards,
Dominik Gresch
--
You received this message because you are subscribed to the Google Groups
"grpc.io" 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/grpc-io/be17126a-ece5-405c-a2ed-a326f50b60b7n%40googlegroups.com.