X Tutup
Skip to content

Fix grpc aio handler typing#15497

Open
XiaXia009 wants to merge 7 commits intopython:mainfrom
XiaXia009:fix-grpc-aio-handler
Open

Fix grpc aio handler typing#15497
XiaXia009 wants to merge 7 commits intopython:mainfrom
XiaXia009:fix-grpc-aio-handler

Conversation

@XiaXia009
Copy link

Hi there, this is my first contribution to typeshed.
This PR is related to #15495

Fix typing for aio ServerInterceptor continuation.

grpc.aio.ServerInterceptor.intercept_service should return
grpc.aio.RpcMethodHandler instead of grpc.RpcMethodHandler.

The current stub references the synchronous handler type, which is
incorrect for the aio API.

This PR updates:

  • the return type of the continuation callable
  • the return type of intercept_service
  • the tests to cover aio handler callables

@github-actions

This comment has been minimized.

@github-actions

This comment has been minimized.

@XiaXia009 XiaXia009 marked this pull request as draft March 9, 2026 17:45
@XiaXia009 XiaXia009 marked this pull request as ready for review March 9, 2026 18:24
@github-actions
Copy link
Contributor

github-actions bot commented Mar 9, 2026

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

@XiaXia009
Copy link
Author

Sorry for the multiple commits. Some of the CI errors were not reproducible in my local environment, so I had to rely on GitHub Actions to verify the fixes.🥹

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.

1 participant

X Tutup