diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 21b7bff9c..b9143c29a 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.371.0" + ".": "0.371.1" } \ No newline at end of file diff --git a/CHANGELOG.md b/CHANGELOG.md index dc7a9a8f9..1aea2070d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,13 @@ # Changelog +## 0.371.1 (2025-10-29) + +Full Changelog: [v0.371.0...v0.371.1](https://github.com/Increase/increase-python/compare/v0.371.0...v0.371.1) + +### Bug Fixes + +* **client:** close streams without requiring full consumption ([32690c8](https://github.com/Increase/increase-python/commit/32690c8d4196c62daef13298e023cb84c333134b)) + ## 0.371.0 (2025-10-29) Full Changelog: [v0.370.0...v0.371.0](https://github.com/Increase/increase-python/compare/v0.370.0...v0.371.0) diff --git a/pyproject.toml b/pyproject.toml index 14145483e..f7096c6b0 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "increase" -version = "0.371.0" +version = "0.371.1" description = "The official Python library for the increase API" dynamic = ["readme"] license = "Apache-2.0" diff --git a/src/increase/_streaming.py b/src/increase/_streaming.py index 7b5fc6503..31a769686 100644 --- a/src/increase/_streaming.py +++ b/src/increase/_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/increase/_version.py b/src/increase/_version.py index 62a913d77..55163a7a8 100644 --- a/src/increase/_version.py +++ b/src/increase/_version.py @@ -1,4 +1,4 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. __title__ = "increase" -__version__ = "0.371.0" # x-release-please-version +__version__ = "0.371.1" # x-release-please-version