FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

fix: set chunk size for async stream content by ohmayr · Pull Request #702 · googleapis/python-api-core · GitHub

This repository was archived by the owner on Feb 23, 2026. It is now read-only.
/ python-api-core Public archive
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension .py  (1) All 1 file type selected
Viewed files
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Unified
Split
Hide whitespace
Diff view
Unified
Split
Hide whitespace
6 changes: 5 additions & 1 deletion google/api_core/rest_streaming_async.py
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,11 @@ def __init__(
):
self._response = response
self._chunk_size = 1024
self._response_itr = self._response.content().__aiter__()
# TODO(https://github.com/googleapis/python-api-core/issues/703): mypy does not recognize the abstract content
# method as an async generator as it looks for the `yield` keyword in the implementation.
# Given that the abstract method is not implemented, mypy fails to recognize it as an async generator.
# mypy warnings are silenced until the linked issue is resolved.
self._response_itr = self._response.content(self._chunk_size).__aiter__() # type: ignore
super(AsyncResponseIterator, self).__init__(
response_message_cls=response_message_cls
)
Expand Down

Back | FazBrowse Home | New Git URL