diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 972d368..9c23897 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "1.0.0-alpha.36" + ".": "1.0.0-alpha.37" } \ No newline at end of file diff --git a/CHANGELOG.md b/CHANGELOG.md index 473730d..13c2b4e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,13 @@ # Changelog +## 1.0.0-alpha.37 (2025-10-30) + +Full Changelog: [v1.0.0-alpha.36...v1.0.0-alpha.37](https://github.com/hubmapconsortium/search-python-sdk/compare/v1.0.0-alpha.36...v1.0.0-alpha.37) + +### Bug Fixes + +* **client:** close streams without requiring full consumption ([16b30a2](https://github.com/hubmapconsortium/search-python-sdk/commit/16b30a23bf54daf97ef4792fe6b58d0e75695ef0)) + ## 1.0.0-alpha.36 (2025-10-18) Full Changelog: [v1.0.0-alpha.35...v1.0.0-alpha.36](https://github.com/hubmapconsortium/search-python-sdk/compare/v1.0.0-alpha.35...v1.0.0-alpha.36) diff --git a/pyproject.toml b/pyproject.toml index c94503d..d9d6008 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "hubmap_search_sdk" -version = "1.0.0-alpha.36" +version = "1.0.0-alpha.37" description = "The official Python library for the hubmap-search-sdk API" dynamic = ["readme"] license = "MIT" diff --git a/src/hubmap_search_sdk/_streaming.py b/src/hubmap_search_sdk/_streaming.py index b98162a..1753b46 100644 --- a/src/hubmap_search_sdk/_streaming.py +++ b/src/hubmap_search_sdk/_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/hubmap_search_sdk/_version.py b/src/hubmap_search_sdk/_version.py index 180bcbc..f352a42 100644 --- a/src/hubmap_search_sdk/_version.py +++ b/src/hubmap_search_sdk/_version.py @@ -1,4 +1,4 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. __title__ = "hubmap_search_sdk" -__version__ = "1.0.0-alpha.36" # x-release-please-version +__version__ = "1.0.0-alpha.37" # x-release-please-version