You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
But grpc.aio (as of version 1.54.2) actually fails if you attempt to pass an interceptor with an async implementation.
The same likely applies to the equivalent methods in the other interceptor types.
Minimum Reproducible Example
The following passes strict type checking with mypy, but fails at runtime. Remove async from the intercept_stream_stream function signature to make it work.
Thank you for supplying an MRE. I was able to reproduce a failure locally with your example. Both the documentation and the source mark these methods as async though... I'm not really sure why.
My apologies, but, I'm too far removed from both async python and gRPC at the moment to be able to adequately respond to this issue with the info I have, and given I've had quite a lot of trouble with contributions to these aio typings so far, I think I'll need a little more convincing about the right course of action here.
i'm not sure about the iterable vs iterator stuff.. clearly streams would be iterators, as the messages are yielded. seems like a different issue than you're reporting though
Description of issue
grpc.aio.StreamStreamClientInterceptor.intercept_stream_stream
is marked asasync
in grpc-stubs:https://github.com/shabbyrobe/grpc-stubs/blob/master/grpc-stubs/aio/__init__.pyi#L351
But grpc.aio (as of version 1.54.2) actually fails if you attempt to pass an interceptor with an async implementation.
The same likely applies to the equivalent methods in the other interceptor types.
Minimum Reproducible Example
The following passes strict type checking with mypy, but fails at runtime. Remove
async
from theintercept_stream_stream
function signature to make it work.main.py
pow.proto
run.sh
The text was updated successfully, but these errors were encountered: