Skip to content

Improve grpcio serializer/deserializer types #14093

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

Merged
merged 1 commit into from
Jun 2, 2025

Conversation

RobinMcCorkell
Copy link
Contributor

Serializers/deserializers should be tied to the request/response type parameter of the containing scope, e.g. so that the xyz_rpc_method_handler() functions can return a properly typed RpcMethodHandler[_TRequest, _TResponse] based on the types of the serializers/deserializers.

Copy link
Contributor

According to mypy_primer, this change has no effect on the checked open source code. 🤖🎉

@RobinMcCorkell
Copy link
Contributor Author

@Avasam I see you reviewed the original grpcio PR, could you take a look?

fyi @shabbyrobe this is part of that PR I had against your grpc-stubs repo: shabbyrobe/grpc-stubs#54

Copy link
Collaborator

@srittau srittau left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! I'm not familiar with grpcio, but this looks plausible to me, and the lack of primer output is also encouraging.

@srittau srittau merged commit 33fb34f into python:main Jun 2, 2025
49 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants