diff --git a/.release-please-manifest.json b/.release-please-manifest.json index f4bcadd..fb611b1 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "1.17.6" + ".": "1.17.7" } \ No newline at end of file diff --git a/CHANGELOG.md b/CHANGELOG.md index 1115ee2..dee931b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,13 @@ # Changelog +## 1.17.7 (2025-10-30) + +Full Changelog: [v1.17.6...v1.17.7](https://github.com/OneBusAway/python-sdk/compare/v1.17.6...v1.17.7) + +### Bug Fixes + +* **client:** close streams without requiring full consumption ([70f09eb](https://github.com/OneBusAway/python-sdk/commit/70f09ebf5cc0c72556e424744ea305f97cf87cda)) + ## 1.17.6 (2025-10-18) Full Changelog: [v1.17.5...v1.17.6](https://github.com/OneBusAway/python-sdk/compare/v1.17.5...v1.17.6) diff --git a/pyproject.toml b/pyproject.toml index 2c0274a..5c9db68 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "onebusaway" -version = "1.17.6" +version = "1.17.7" description = "The official Python library for the onebusaway-sdk API" dynamic = ["readme"] license = "Apache-2.0" diff --git a/src/onebusaway/_streaming.py b/src/onebusaway/_streaming.py index 957b8da..19eceeb 100644 --- a/src/onebusaway/_streaming.py +++ b/src/onebusaway/_streaming.py @@ -57,9 +57,8 @@ def __stream__(self) -> Iterator[_T]: for sse in iterator: yield process_data(data=sse.json(), cast_to=cast_to, response=response) - # Ensure the entire stream is consumed - for _sse in iterator: - ... + # As we might not fully consume the response stream, we need to close it explicitly + response.close() def __enter__(self) -> Self: return self @@ -121,9 +120,8 @@ async def __stream__(self) -> AsyncIterator[_T]: async for sse in iterator: yield process_data(data=sse.json(), cast_to=cast_to, response=response) - # Ensure the entire stream is consumed - async for _sse in iterator: - ... + # As we might not fully consume the response stream, we need to close it explicitly + await response.aclose() async def __aenter__(self) -> Self: return self diff --git a/src/onebusaway/_version.py b/src/onebusaway/_version.py index 994b86d..8f0a4ce 100644 --- a/src/onebusaway/_version.py +++ b/src/onebusaway/_version.py @@ -1,4 +1,4 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. __title__ = "onebusaway" -__version__ = "1.17.6" # x-release-please-version +__version__ = "1.17.7" # x-release-please-version