Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .release-please-manifest.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
".": "1.37.0"
".": "1.37.1"
}
2 changes: 1 addition & 1 deletion .stats.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
configured_endpoints: 46
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/finch%2Ffinch-0105d239fcaf84750c886dfa6c2cfbf2b2087f89a48f8827c4cbe28479ebfb13.yml
openapi_spec_hash: 34895c3d3c137fb9f5a019ac5370afbb
config_hash: 6d3585c0032e08d723d077d660fc8448
config_hash: 5c64f384746e7570c10f19fe241062a7
14 changes: 14 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,19 @@
# Changelog

## 1.37.1 (2025-10-31)

Full Changelog: [v1.37.0...v1.37.1](https://github.com/Finch-API/finch-api-python/compare/v1.37.0...v1.37.1)

### Bug Fixes

* **client:** close streams without requiring full consumption ([b614e0b](https://github.com/Finch-API/finch-api-python/commit/b614e0babf5c210ef96365d996a3bf0f72c5cd4c))


### Chores

* **internal/tests:** avoid race condition with implicit client cleanup ([f0b4163](https://github.com/Finch-API/finch-api-python/commit/f0b4163bb201412cdd322238191b74376670a05e))
* **ownership:** move from data to platform team ([#676](https://github.com/Finch-API/finch-api-python/issues/676)) ([b95a421](https://github.com/Finch-API/finch-api-python/commit/b95a421af86e436c2952b3c915b5cd9fadbd1330))

## 1.37.0 (2025-10-27)

Full Changelog: [v1.36.0...v1.37.0](https://github.com/Finch-API/finch-api-python/compare/v1.36.0...v1.37.0)
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[project]
name = "finch-api"
version = "1.37.0"
version = "1.37.1"
description = "The official Python library for the Finch API"
dynamic = ["readme"]
license = "Apache-2.0"
Expand Down
10 changes: 4 additions & 6 deletions src/finch/_streaming.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion src/finch/_version.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.

__title__ = "finch"
__version__ = "1.37.0" # x-release-please-version
__version__ = "1.37.1" # x-release-please-version
Loading