diff --git a/.release-please-manifest.json b/.release-please-manifest.json index ab3c7f7..5bce1c5 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "2.0.0-alpha.44" + ".": "2.0.0-alpha.45" } \ No newline at end of file diff --git a/CHANGELOG.md b/CHANGELOG.md index c3d6c8b..0713777 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,13 @@ # Changelog +## 2.0.0-alpha.45 (2025-10-30) + +Full Changelog: [v2.0.0-alpha.44...v2.0.0-alpha.45](https://github.com/hubmapconsortium/entity-python-sdk/compare/v2.0.0-alpha.44...v2.0.0-alpha.45) + +### Bug Fixes + +* **client:** close streams without requiring full consumption ([686159f](https://github.com/hubmapconsortium/entity-python-sdk/commit/686159f96128ce212fd83eba6b4a685beb13d316)) + ## 2.0.0-alpha.44 (2025-10-18) Full Changelog: [v2.0.0-alpha.43...v2.0.0-alpha.44](https://github.com/hubmapconsortium/entity-python-sdk/compare/v2.0.0-alpha.43...v2.0.0-alpha.44) diff --git a/pyproject.toml b/pyproject.toml index 5b04128..6b07de5 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "hubmap_entity_sdk" -version = "2.0.0-alpha.44" +version = "2.0.0-alpha.45" description = "The official Python library for the hubmap-entity-sdk API" dynamic = ["readme"] license = "MIT" diff --git a/src/hubmap_entity_sdk/_streaming.py b/src/hubmap_entity_sdk/_streaming.py index 62ffd0e..5ca7a65 100644 --- a/src/hubmap_entity_sdk/_streaming.py +++ b/src/hubmap_entity_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_entity_sdk/_version.py b/src/hubmap_entity_sdk/_version.py index 776365f..bb4c87c 100644 --- a/src/hubmap_entity_sdk/_version.py +++ b/src/hubmap_entity_sdk/_version.py @@ -1,4 +1,4 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. __title__ = "hubmap_entity_sdk" -__version__ = "2.0.0-alpha.44" # x-release-please-version +__version__ = "2.0.0-alpha.45" # x-release-please-version