mypy-protobuf
mypy-protobuf copied to clipboard
Compare mypy-protobuf to protobuf --pyi_out support (starting with 3.20)
Has anyone compared this with mypy-protobuf's output? I'm not sure if it supports grpc or not.
I haven't done a comparison. You're welcome to!
grpc_tools still does not support protobuf 3.20
grpc_tools still does not support protobuf 3.20
Is this true? It seemed to be working for me.
I do see that it doesn't support v4 or later, however:
https://github.com/grpc/grpc/blob/v1.46.3/tools/distrib/python/grpcio_tools/setup.py#L293
https://github.com/grpc/grpc/issues/29969
https://github.com/grpc/grpc/blob/master/tools/distrib/python/grpcio_tools/grpc_version.py i cant use --pyi_out with python -m grpcio_tools.protoc
Hmm. This looks related: https://github.com/grpc/grpc/issues/29650
It doesn't seem production ready yet. mypy gives a bunch of errors running on the --pyi_out generated stubs
this project has spent a bunt of time battle hardening the type stubs and adding tests.
AFAICT, the built-in --pyi_out stubs have not. Your mileage may vary.
Might be a nice idea to use the test suites from mypy-protobuf on the built in stubs and see if it uncovers bugs.