GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | ||||||||||||||||||||||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | ||||||||||||||||||||||||||
GeezerVison is showing github.com — feat: add type annotations to wrapped grpc calls by daniel-sanche · Pull Request #554 · googleapis/python-api-core
This repository was archived by the owner on Feb 23, 2026. It is now read-only.
Conversation
|
|
@daniel-sanche Please could you address the lint failure? |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
@parthea done |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
| # public type alias denoting the return type of streaming gapic calls | ||
| GrpcAsyncStream = _WrappedStreamResponseMixin[S] | ||
| # public type alias denoting the return type of unary gapic calls | ||
| AwaitableGrpcCall = _WrappedUnaryResponseMixin[U] |
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Let me know if you have other naming suggestions for these (AsyncGrpcCall? GrpcAsyncIterable?)
I liked Awaitable because it's clear how to interact with it, and Stream instead of Iterable because it can do more than just iterate. But names are hard and I'm open to alternatives
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
|
|
||
|
|
||
| class _StreamingResponseIterator(grpc.Call): | ||
| class GrpcStream(grpc.Call, Generic[S]): |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Do you think this could be a breaking change? Could we keep the name as _StreamingResponseIterator ? There are many hits for _StreamingResponseIterator in Google search. I'm worried that changing _StreamingResponseIterator could cause issues downstream in user code as it is a response we provide.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Makes sense, I'll create a type alias instead, like I did on the async side
I thought it would be safe to change since it's a private class, but better to be on the safe side
Sorry, something went wrong.
There was an error while loading. Please reload this page.
Co-authored-by: Anthonios Partheniou <[email protected]>
There was an error while loading. Please reload this page.
Successfully merging this pull request may close these issues.
There was an error while loading. Please reload this page.