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

Compare mypy-protobuf to protobuf --pyi_out support (starting with 3.20) #368

Open
gitpushdashf opened this issue Apr 8, 2022 · 7 comments

Comments

@gitpushdashf
Copy link

Has anyone compared this with mypy-protobuf's output? I'm not sure if it supports grpc or not.

@nipunn1313
Copy link
Owner

I haven't done a comparison. You're welcome to!

@q0w
Copy link

q0w commented Jun 9, 2022

grpc_tools still does not support protobuf 3.20

@gitpushdashf
Copy link
Author

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

grpc/grpc#29969

@q0w
Copy link

q0w commented Jun 9, 2022

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

@gitpushdashf
Copy link
Author

Hmm. This looks related: grpc/grpc#29650

@ajasmin
Copy link

ajasmin commented Jul 27, 2022

It doesn't seem production ready yet. mypy gives a bunch of errors running on the --pyi_out generated stubs

@nipunn1313
Copy link
Owner

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.

@nipunn1313 nipunn1313 changed the title protobuf 3.20 adds --pyi_out support Compare mypy-protobuf to protobuf --pyi_out support (starting with 3.20) Aug 23, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants