|
|
@ -477,8 +477,8 @@ class _InterceptedStreamResponseMixin: |
|
|
|
_response_aiter: Optional[AsyncIterable[ResponseType]] |
|
|
|
_response_aiter: Optional[AsyncIterable[ResponseType]] |
|
|
|
|
|
|
|
|
|
|
|
def _init_stream_response_mixin(self) -> None: |
|
|
|
def _init_stream_response_mixin(self) -> None: |
|
|
|
# Is initalized later, otherwise if the iterator is not finally |
|
|
|
# Is initialized later, otherwise if the iterator is not finally |
|
|
|
# consumed a logging warning is emmited by Asyncio. |
|
|
|
# consumed a logging warning is emitted by Asyncio. |
|
|
|
self._response_aiter = None |
|
|
|
self._response_aiter = None |
|
|
|
|
|
|
|
|
|
|
|
async def _wait_for_interceptor_task_response_iterator( |
|
|
|
async def _wait_for_interceptor_task_response_iterator( |
|
|
@ -1143,10 +1143,10 @@ class _StreamCallResponseIterator: |
|
|
|
class UnaryStreamCallResponseIterator( |
|
|
|
class UnaryStreamCallResponseIterator( |
|
|
|
_StreamCallResponseIterator, _base_call.UnaryStreamCall |
|
|
|
_StreamCallResponseIterator, _base_call.UnaryStreamCall |
|
|
|
): |
|
|
|
): |
|
|
|
"""UnaryStreamCall class wich uses an alternative response iterator.""" |
|
|
|
"""UnaryStreamCall class which uses an alternative response iterator.""" |
|
|
|
|
|
|
|
|
|
|
|
async def read(self) -> Union[EOFType, ResponseType]: |
|
|
|
async def read(self) -> Union[EOFType, ResponseType]: |
|
|
|
# Behind the scenes everyting goes through the |
|
|
|
# Behind the scenes everything goes through the |
|
|
|
# async iterator. So this path should not be reached. |
|
|
|
# async iterator. So this path should not be reached. |
|
|
|
raise NotImplementedError() |
|
|
|
raise NotImplementedError() |
|
|
|
|
|
|
|
|
|
|
@ -1154,21 +1154,21 @@ class UnaryStreamCallResponseIterator( |
|
|
|
class StreamStreamCallResponseIterator( |
|
|
|
class StreamStreamCallResponseIterator( |
|
|
|
_StreamCallResponseIterator, _base_call.StreamStreamCall |
|
|
|
_StreamCallResponseIterator, _base_call.StreamStreamCall |
|
|
|
): |
|
|
|
): |
|
|
|
"""StreamStreamCall class wich uses an alternative response iterator.""" |
|
|
|
"""StreamStreamCall class which uses an alternative response iterator.""" |
|
|
|
|
|
|
|
|
|
|
|
async def read(self) -> Union[EOFType, ResponseType]: |
|
|
|
async def read(self) -> Union[EOFType, ResponseType]: |
|
|
|
# Behind the scenes everyting goes through the |
|
|
|
# Behind the scenes everything goes through the |
|
|
|
# async iterator. So this path should not be reached. |
|
|
|
# async iterator. So this path should not be reached. |
|
|
|
raise NotImplementedError() |
|
|
|
raise NotImplementedError() |
|
|
|
|
|
|
|
|
|
|
|
async def write(self, request: RequestType) -> None: |
|
|
|
async def write(self, request: RequestType) -> None: |
|
|
|
# Behind the scenes everyting goes through the |
|
|
|
# Behind the scenes everything goes through the |
|
|
|
# async iterator provided by the InterceptedStreamStreamCall. |
|
|
|
# async iterator provided by the InterceptedStreamStreamCall. |
|
|
|
# So this path should not be reached. |
|
|
|
# So this path should not be reached. |
|
|
|
raise NotImplementedError() |
|
|
|
raise NotImplementedError() |
|
|
|
|
|
|
|
|
|
|
|
async def done_writing(self) -> None: |
|
|
|
async def done_writing(self) -> None: |
|
|
|
# Behind the scenes everyting goes through the |
|
|
|
# Behind the scenes everything goes through the |
|
|
|
# async iterator provided by the InterceptedStreamStreamCall. |
|
|
|
# async iterator provided by the InterceptedStreamStreamCall. |
|
|
|
# So this path should not be reached. |
|
|
|
# So this path should not be reached. |
|
|
|
raise NotImplementedError() |
|
|
|
raise NotImplementedError() |
|
|
|