Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

release: 2.0.0-beta.3 #93

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
stainless-app wants to merge 4 commits into main
base: main
Choose a base branch
Loading
from release-please--branches--main--changes--next
Open
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
View file Open in desktop
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
".": "2.0.0-beta.2"
".": "2.0.0-beta.3"
}
14 changes: 14 additions & 0 deletions CHANGELOG.md
View file Open in desktop
Original file line number Diff line number Diff line change
@@ -1,5 +1,19 @@
# Changelog

## 2.0.0-beta.3 (2025年11月03日)

Full Changelog: [v2.0.0-beta.2...v2.0.0-beta.3](https://github.com/replicate/replicate-python-beta/compare/v2.0.0-beta.2...v2.0.0-beta.3)

### Bug Fixes

* **client:** close streams without requiring full consumption ([73bd0ab](https://github.com/replicate/replicate-python-beta/commit/73bd0ab734be57dab38fe3c59d43e016429f16ed))


### Chores

* **internal/tests:** avoid race condition with implicit client cleanup ([2e35773](https://github.com/replicate/replicate-python-beta/commit/2e3577300dcb0222c1d1d9e830e63d34b3c13296))
* **internal:** grammar fix (it's -> its) ([7f6ba66](https://github.com/replicate/replicate-python-beta/commit/7f6ba660cb0ef32ec09b51b2b59256eaf3bc973a))

## 2.0.0-beta.2 (2025年10月23日)

Full Changelog: [v2.0.0-beta.1...v2.0.0-beta.2](https://github.com/replicate/replicate-python-beta/compare/v2.0.0-beta.1...v2.0.0-beta.2)
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
View file Open in desktop
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[project]
name = "replicate"
version = "2.0.0-beta.2"
version = "2.0.0-beta.3"
description = "The official Python library for the replicate API"
dynamic = ["readme"]
license = "Apache-2.0"
Expand Down
10 changes: 4 additions & 6 deletions src/replicate/_streaming.py
View file Open in desktop
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/replicate/_utils/_utils.py
View file Open in desktop
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ def is_given(obj: _T | NotGiven | Omit) -> TypeGuard[_T]:
# Type safe methods for narrowing types with TypeVars.
# The default narrowing for isinstance(obj, dict) is dict[unknown, unknown],
# however this cause Pyright to rightfully report errors. As we know we don't
# care about the contained types we can safely use `object` in it's place.
# care about the contained types we can safely use `object` in its place.
#
# There are two separate functions defined, `is_*` and `is_*_t` for different use cases.
# `is_*` is for when you're dealing with an unknown input
Expand Down
2 changes: 1 addition & 1 deletion src/replicate/_version.py
View file Open in desktop
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__ = "replicate"
__version__ = "2.0.0-beta.2" # x-release-please-version
__version__ = "2.0.0-beta.3" # x-release-please-version
Loading

AltStyle によって変換されたページ (->オリジナル) /