Skip to content

Commit b5c849c

Browse files
release: 6.4.0-alpha19 (#105)
* codegen metadata * codegen metadata * fix(client): close streams without requiring full consumption * release: 6.4.0-alpha19 --------- Co-authored-by: stainless-app[bot] <142633134+stainless-app[bot]@users.noreply.github.com>
1 parent 8f941fd commit b5c849c

6 files changed

Lines changed: 16 additions & 10 deletions

File tree

.release-please-manifest.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
{
2-
".": "6.4.0-alpha18"
2+
".": "6.4.0-alpha19"
33
}

.stats.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
configured_endpoints: 77
22
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/courier%2Fcourier-674ed1cbb95c8873a65e9ccce88c583c7fc8e65e7e266f213b340ebf3cd30ccd.yml
33
openapi_spec_hash: c0f755026b10aa2283853347915ee90f
4-
config_hash: 30d699fd984f2fc03258eb666dc848a2
4+
config_hash: 935323e0c2c5db0c9395d46768e05f28

CHANGELOG.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,13 @@
11
# Changelog
22

3+
## 6.4.0-alpha19 (2025-11-01)
4+
5+
Full Changelog: [v6.4.0-alpha18...v6.4.0-alpha19](https://github.com/trycourier/courier-python/compare/v6.4.0-alpha18...v6.4.0-alpha19)
6+
7+
### Bug Fixes
8+
9+
* **client:** close streams without requiring full consumption ([31633eb](https://github.com/trycourier/courier-python/commit/31633eb82c4d91ac6972769edac89b53309988b3))
10+
311
## 6.4.0-alpha18 (2025-10-31)
412

513
Full Changelog: [v6.4.0-alpha17...v6.4.0-alpha18](https://github.com/trycourier/courier-python/compare/v6.4.0-alpha17...v6.4.0-alpha18)

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[project]
22
name = "trycourier"
3-
version = "6.4.0-alpha18"
3+
version = "6.4.0-alpha19"
44
description = "The official Python library for the courier API"
55
dynamic = ["readme"]
66
license = "Apache-2.0"

src/courier/_streaming.py

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -57,9 +57,8 @@ def __stream__(self) -> Iterator[_T]:
5757
for sse in iterator:
5858
yield process_data(data=sse.json(), cast_to=cast_to, response=response)
5959

60-
# Ensure the entire stream is consumed
61-
for _sse in iterator:
62-
...
60+
# As we might not fully consume the response stream, we need to close it explicitly
61+
response.close()
6362

6463
def __enter__(self) -> Self:
6564
return self
@@ -121,9 +120,8 @@ async def __stream__(self) -> AsyncIterator[_T]:
121120
async for sse in iterator:
122121
yield process_data(data=sse.json(), cast_to=cast_to, response=response)
123122

124-
# Ensure the entire stream is consumed
125-
async for _sse in iterator:
126-
...
123+
# As we might not fully consume the response stream, we need to close it explicitly
124+
await response.aclose()
127125

128126
async def __aenter__(self) -> Self:
129127
return self

src/courier/_version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
22

33
__title__ = "courier"
4-
__version__ = "6.4.0-alpha18" # x-release-please-version
4+
__version__ = "6.4.0-alpha19" # x-release-please-version

0 commit comments

Comments
 (0)