diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 3ca49358..0c6e1537 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.109.0" + ".": "0.109.1" } \ No newline at end of file diff --git a/CHANGELOG.md b/CHANGELOG.md index 9492a453..c6cc0177 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,13 @@ # Changelog +## 0.109.1 (2025-10-29) + +Full Changelog: [v0.109.0...v0.109.1](https://github.com/lithic-com/lithic-python/compare/v0.109.0...v0.109.1) + +### Bug Fixes + +* **client:** close streams without requiring full consumption ([4febcc1](https://github.com/lithic-com/lithic-python/commit/4febcc1dfdafd46caaedc778eace3c34da508eab)) + ## 0.109.0 (2025-10-23) Full Changelog: [v0.108.0...v0.109.0](https://github.com/lithic-com/lithic-python/compare/v0.108.0...v0.109.0) diff --git a/pyproject.toml b/pyproject.toml index 25906cf0..1c5a47ff 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "lithic" -version = "0.109.0" +version = "0.109.1" description = "The official Python library for the lithic API" dynamic = ["readme"] license = "Apache-2.0" diff --git a/src/lithic/_streaming.py b/src/lithic/_streaming.py index 4363f365..e0e5fa00 100644 --- a/src/lithic/_streaming.py +++ b/src/lithic/_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/lithic/_version.py b/src/lithic/_version.py index 38226f24..a134b3f0 100644 --- a/src/lithic/_version.py +++ b/src/lithic/_version.py @@ -1,4 +1,4 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. __title__ = "lithic" -__version__ = "0.109.0" # x-release-please-version +__version__ = "0.109.1" # x-release-please-version