Skip to content

Commit 55933a3

Browse files
authored
Merge pull request #120 from steel-dev/release-please--branches--main--changes--next
release: 0.9.1
2 parents cbc0191 + 0137777 commit 55933a3

File tree

12 files changed

+80
-12
lines changed

12 files changed

+80
-12
lines changed

.github/workflows/ci.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,13 +36,13 @@ jobs:
3636
run: ./scripts/lint
3737

3838
build:
39-
if: github.repository == 'stainless-sdks/steel-python' && (github.event_name == 'push' || github.event.pull_request.head.repo.fork)
39+
if: github.event_name == 'push' || github.event.pull_request.head.repo.fork
4040
timeout-minutes: 10
4141
name: build
4242
permissions:
4343
contents: read
4444
id-token: write
45-
runs-on: depot-ubuntu-24.04
45+
runs-on: ${{ github.repository == 'stainless-sdks/steel-python' && 'depot-ubuntu-24.04' || 'ubuntu-latest' }}
4646
steps:
4747
- uses: actions/checkout@v4
4848

@@ -61,12 +61,14 @@ jobs:
6161
run: rye build
6262

6363
- name: Get GitHub OIDC Token
64+
if: github.repository == 'stainless-sdks/steel-python'
6465
id: github-oidc
6566
uses: actions/github-script@v6
6667
with:
6768
script: core.setOutput('github_token', await core.getIDToken());
6869

6970
- name: Upload tarball
71+
if: github.repository == 'stainless-sdks/steel-python'
7072
env:
7173
URL: https://pkg.stainless.com/s
7274
AUTH: ${{ steps.github-oidc.outputs.github_token }}

.release-please-manifest.json

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

.stats.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
configured_endpoints: 33
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/nen-labs%2Fsteel-b5496a8d20faef3918563bbf1563b9c1f0ab280fa0aa32baca55faa95c8d8266.yml
3-
openapi_spec_hash: b776cb76def983d026964ea90cdb3e29
4-
config_hash: 3dda15a7a3da8ba8e97a8ec239cbcb80
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/nen-labs%2Fsteel-d693d9e2a0618bc5b31d9ebd9d651a63481620201dfab9d60bbc9cb2e4447dc9.yml
3+
openapi_spec_hash: 33fd12f9846b38655baee7149258df34
4+
config_hash: 0ac588be60ea913482f5488577c17b6e

CHANGELOG.md

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

3+
## 0.9.1 (2025-09-02)
4+
5+
Full Changelog: [v0.9.0...v0.9.1](https://github.com/steel-dev/steel-python/compare/v0.9.0...v0.9.1)
6+
7+
### Bug Fixes
8+
9+
* avoid newer type syntax ([5791302](https://github.com/steel-dev/steel-python/commit/57913023bca4a08a7ae066351a4e44be45212e67))
10+
* timeout param issues ([8bf1ece](https://github.com/steel-dev/steel-python/commit/8bf1eced7e0966656d67ea4aad207ab5ed8235d4))
11+
12+
13+
### Chores
14+
15+
* **internal:** add Sequence related utils ([ec2a5db](https://github.com/steel-dev/steel-python/commit/ec2a5db2fa3ff0855cb8e532a09a4e0a52387191))
16+
* **internal:** change ci workflow machines ([d7ce4e6](https://github.com/steel-dev/steel-python/commit/d7ce4e63f398c444339528f62c7ea893fc35f4ff))
17+
* **internal:** update pyright exclude list ([d0b2591](https://github.com/steel-dev/steel-python/commit/d0b2591f9890bd2069e1fb8f997f8c9f34bb5f4c))
18+
* update github action ([a001e5c](https://github.com/steel-dev/steel-python/commit/a001e5ca1eaaf635369486a859e62350c922e372))
19+
320
## 0.9.0 (2025-08-22)
421

522
Full Changelog: [v0.8.0...v0.9.0](https://github.com/steel-dev/steel-python/compare/v0.8.0...v0.9.0)

pyproject.toml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[project]
22
name = "steel-sdk"
3-
version = "0.9.0"
3+
version = "0.9.1"
44
description = "The official Python library for the steel API"
55
dynamic = ["readme"]
66
license = "Apache-2.0"
@@ -148,6 +148,7 @@ exclude = [
148148
"_dev",
149149
".venv",
150150
".nox",
151+
".git",
151152
]
152153

153154
reportImplicitOverride = true

src/steel/_models.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -304,7 +304,7 @@ def model_dump(
304304
exclude_none=exclude_none,
305305
)
306306

307-
return cast(dict[str, Any], json_safe(dumped)) if mode == "json" else dumped
307+
return cast("dict[str, Any]", json_safe(dumped)) if mode == "json" else dumped
308308

309309
@override
310310
def model_dump_json(

src/steel/_types.py

Lines changed: 35 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,21 @@
1313
Mapping,
1414
TypeVar,
1515
Callable,
16+
Iterator,
1617
Optional,
1718
Sequence,
1819
)
19-
from typing_extensions import Set, Literal, Protocol, TypeAlias, TypedDict, override, runtime_checkable
20+
from typing_extensions import (
21+
Set,
22+
Literal,
23+
Protocol,
24+
TypeAlias,
25+
TypedDict,
26+
SupportsIndex,
27+
overload,
28+
override,
29+
runtime_checkable,
30+
)
2031

2132
import httpx
2233
import pydantic
@@ -217,3 +228,26 @@ class _GenericAlias(Protocol):
217228
class HttpxSendArgs(TypedDict, total=False):
218229
auth: httpx.Auth
219230
follow_redirects: bool
231+
232+
233+
_T_co = TypeVar("_T_co", covariant=True)
234+
235+
236+
if TYPE_CHECKING:
237+
# This works because str.__contains__ does not accept object (either in typeshed or at runtime)
238+
# https://github.com/hauntsaninja/useful_types/blob/5e9710f3875107d068e7679fd7fec9cfab0eff3b/useful_types/__init__.py#L285
239+
class SequenceNotStr(Protocol[_T_co]):
240+
@overload
241+
def __getitem__(self, index: SupportsIndex, /) -> _T_co: ...
242+
@overload
243+
def __getitem__(self, index: slice, /) -> Sequence[_T_co]: ...
244+
def __contains__(self, value: object, /) -> bool: ...
245+
def __len__(self) -> int: ...
246+
def __iter__(self) -> Iterator[_T_co]: ...
247+
def index(self, value: Any, start: int = 0, stop: int = ..., /) -> int: ...
248+
def count(self, value: Any, /) -> int: ...
249+
def __reversed__(self) -> Iterator[_T_co]: ...
250+
else:
251+
# just point this to a normal `Sequence` at runtime to avoid having to special case
252+
# deserializing our custom sequence type
253+
SequenceNotStr = Sequence

src/steel/_utils/__init__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@
3838
extract_type_arg as extract_type_arg,
3939
is_iterable_type as is_iterable_type,
4040
is_required_type as is_required_type,
41+
is_sequence_type as is_sequence_type,
4142
is_annotated_type as is_annotated_type,
4243
is_type_alias_type as is_type_alias_type,
4344
strip_annotated_type as strip_annotated_type,

src/steel/_utils/_typing.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,11 @@ def is_list_type(typ: type) -> bool:
2626
return (get_origin(typ) or typ) == list
2727

2828

29+
def is_sequence_type(typ: type) -> bool:
30+
origin = get_origin(typ) or typ
31+
return origin == typing_extensions.Sequence or origin == typing.Sequence or origin == _c_abc.Sequence
32+
33+
2934
def is_iterable_type(typ: type) -> bool:
3035
"""If the given type is `typing.Iterable[T]`"""
3136
origin = get_origin(typ) or typ

src/steel/_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__ = "steel"
4-
__version__ = "0.9.0" # x-release-please-version
4+
__version__ = "0.9.1" # x-release-please-version

0 commit comments

Comments
 (0)