-
Notifications
You must be signed in to change notification settings - Fork 0
release: 0.34.0 #106
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
base: main
Are you sure you want to change the base?
release: 0.34.0 #106
Changes from all commits
6b5c9ad
3cc3332
2c99a7f
e01d911
d330dea
b75e2b3
b76b873
f62f1a4
3d7a283
0f66c9d
0564662
2803c0e
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,3 +1,3 @@ | ||
| { | ||
| ".": "0.33.0" | ||
| ".": "0.34.0" | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,4 +1,4 @@ | ||
| configured_endpoints: 23 | ||
| openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/hyperspell%2Fhyperspell-36cb6e2474f3fe09749b7a2f24409d48c8db332d624fa7eeb1ee6b6135774133.yml | ||
| openapi_spec_hash: 339a1b55d6b1a55213d16bf336045d0d | ||
| config_hash: 983708fc30c86269c2149a960d0bfec1 | ||
| openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/hyperspell%2Fhyperspell-d6e895ab5ce17b403a1981c9f3e3e1a357d2016683627cbbc725c10f6aa2e13a.yml | ||
| openapi_spec_hash: 36fc6b210e87fbd995fd578adcbe6626 | ||
| config_hash: fd3005a8f140e5baadd3d25b3c9cd79f |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -4,7 +4,7 @@ | |
| import json | ||
| import inspect | ||
| from types import TracebackType | ||
| from typing import TYPE_CHECKING, Any, Generic, TypeVar, Iterator, AsyncIterator, cast | ||
| from typing import TYPE_CHECKING, Any, Generic, TypeVar, Iterator, Optional, AsyncIterator, cast | ||
| from typing_extensions import Self, Protocol, TypeGuard, override, get_origin, runtime_checkable | ||
|
|
||
| import httpx | ||
|
|
@@ -13,6 +13,7 @@ | |
|
|
||
| if TYPE_CHECKING: | ||
| from ._client import Hyperspell, AsyncHyperspell | ||
| from ._models import FinalRequestOptions | ||
|
|
||
|
|
||
| _T = TypeVar("_T") | ||
|
|
@@ -22,7 +23,7 @@ class Stream(Generic[_T]): | |
| """Provides the core interface to iterate over a synchronous stream response.""" | ||
|
|
||
| response: httpx.Response | ||
|
|
||
| _options: Optional[FinalRequestOptions] = None | ||
| _decoder: SSEBytesDecoder | ||
|
|
||
| def __init__( | ||
|
|
@@ -31,6 +32,7 @@ def __init__( | |
| cast_to: type[_T], | ||
| response: httpx.Response, | ||
| client: Hyperspell, | ||
| options: Optional[FinalRequestOptions] = None, | ||
| timeout: float | None = None, | ||
| ) -> None: | ||
| """Initialize the synchronous stream. | ||
|
|
@@ -44,6 +46,7 @@ def __init__( | |
| self.response = response | ||
| self._cast_to = cast_to | ||
| self._client = client | ||
| self._options = options | ||
|
Comment on lines
46
to
+49
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Duplicate Code: This function 📍 Original Location: Function: 💡 Recommendation: Consider importing and reusing the existing function instead of duplicating the logic. |
||
| self._timeout = timeout | ||
| self._decoder = client._make_sse_decoder() | ||
| self._iterator = self.__stream__() | ||
|
|
@@ -115,7 +118,7 @@ class AsyncStream(Generic[_T]): | |
| """Provides the core interface to iterate over an asynchronous stream response.""" | ||
|
|
||
| response: httpx.Response | ||
|
|
||
| _options: Optional[FinalRequestOptions] = None | ||
| _decoder: SSEDecoder | SSEBytesDecoder | ||
|
|
||
| def __init__( | ||
|
|
@@ -124,6 +127,7 @@ def __init__( | |
| cast_to: type[_T], | ||
| response: httpx.Response, | ||
| client: AsyncHyperspell, | ||
| options: Optional[FinalRequestOptions] = None, | ||
| timeout: float | None = None, | ||
| ) -> None: | ||
| """Initialize the asynchronous stream. | ||
|
|
@@ -137,6 +141,7 @@ def __init__( | |
| self.response = response | ||
| self._cast_to = cast_to | ||
| self._client = client | ||
| self._options = options | ||
| self._timeout = timeout | ||
| self._decoder = client._make_sse_decoder() | ||
| self._iterator = self.__stream__() | ||
|
|
||
| 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__ = "hyperspell" | ||
| __version__ = "0.33.0" # x-release-please-version | ||
| __version__ = "0.34.0" # x-release-please-version |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Correctness: Removing the PYPI_TOKEN validation lets the script pass even when the token is unset, which can cause release failures later (or worse, publish without auth). Reintroduce the check to fail fast when the secret is missing. 🚨
🤖 AI Agent Prompt for Cursor/Windsurf