Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 45b8a6d

Browse filesBrowse files
authored
fix: set chunk size for async stream content (#702)
* fix: set chunk size for async stream content * add TODO comment
1 parent 58516ef commit 45b8a6d
Copy full SHA for 45b8a6d

File tree

1 file changed

+5
-1
lines changed
Filter options

1 file changed

+5
-1
lines changed

‎google/api_core/rest_streaming_async.py

Copy file name to clipboardExpand all lines: google/api_core/rest_streaming_async.py
+5-1Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,11 @@ def __init__(
4949
):
5050
self._response = response
5151
self._chunk_size = 1024
52-
self._response_itr = self._response.content().__aiter__()
52+
# TODO(https://github.com/googleapis/python-api-core/issues/703): mypy does not recognize the abstract content
53+
# method as an async generator as it looks for the `yield` keyword in the implementation.
54+
# Given that the abstract method is not implemented, mypy fails to recognize it as an async generator.
55+
# mypy warnings are silenced until the linked issue is resolved.
56+
self._response_itr = self._response.content(self._chunk_size).__aiter__() # type: ignore
5357
super(AsyncResponseIterator, self).__init__(
5458
response_message_cls=response_message_cls
5559
)

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.