| 263 | |
| 264 | |
| 265 | class AsyncResponseStream(AsyncByteStream): |
| 266 | def __init__(self, httpcore_stream: typing.AsyncIterable[bytes]) -> None: |
| 267 | self._httpcore_stream = httpcore_stream |
| 268 | |
| 269 | async def __aiter__(self) -> typing.AsyncIterator[bytes]: |
| 270 | with map_httpcore_exceptions(): |
| 271 | async for part in self._httpcore_stream: |
| 272 | yield part |
| 273 | |
| 274 | async def aclose(self) -> None: |
| 275 | if hasattr(self._httpcore_stream, "aclose"): |
| 276 | await self._httpcore_stream.aclose() |
| 277 | |
| 278 | |
| 279 | class AsyncHTTPTransport(AsyncBaseTransport): |
no outgoing calls
no test coverage detected