Skip to content

Commit 71b3c73

Browse files
authored
Merge pull request #58 from steel-dev/release-please--branches--main--changes--next
release: 0.1.0-beta.7
2 parents 882dfd7 + a8e4346 commit 71b3c73

File tree

7 files changed

+38
-11
lines changed

7 files changed

+38
-11
lines changed

.release-please-manifest.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
{
2-
".": "0.1.0-beta.6"
2+
".": "0.1.0-beta.7"
33
}

CHANGELOG.md

+18
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,23 @@
11
# Changelog
22

3+
## 0.1.0-beta.7 (2025-01-10)
4+
5+
Full Changelog: [v0.1.0-beta.6...v0.1.0-beta.7](https://github.com/steel-dev/steel-python/compare/v0.1.0-beta.6...v0.1.0-beta.7)
6+
7+
### Bug Fixes
8+
9+
* correctly handle deserialising `cls` fields ([#60](https://github.com/steel-dev/steel-python/issues/60)) ([cd8bb56](https://github.com/steel-dev/steel-python/commit/cd8bb56b3490f4fd7d819b7c8e4770e65aee75f5))
10+
11+
12+
### Chores
13+
14+
* **internal:** codegen related update ([#59](https://github.com/steel-dev/steel-python/issues/59)) ([ea787f7](https://github.com/steel-dev/steel-python/commit/ea787f7e4e9c074f185ed2f76cf7e95de5a80a91))
15+
16+
17+
### Documentation
18+
19+
* fix typos ([#57](https://github.com/steel-dev/steel-python/issues/57)) ([c51f862](https://github.com/steel-dev/steel-python/commit/c51f86264ecdfb8f006a1b3bcc4c7c0ae47eb8f6))
20+
321
## 0.1.0-beta.6 (2025-01-08)
422

523
Full Changelog: [v0.1.0-beta.5...v0.1.0-beta.6](https://github.com/steel-dev/steel-python/compare/v0.1.0-beta.5...v0.1.0-beta.6)

README.md

+3-4
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,7 @@ except steel.APIStatusError as e:
172172
print(e.response)
173173
```
174174

175-
Error codes are as followed:
175+
Error codes are as follows:
176176

177177
| Status Code | Error Type |
178178
| ----------- | -------------------------- |
@@ -303,8 +303,7 @@ If you need to access undocumented endpoints, params, or response properties, th
303303
#### Undocumented endpoints
304304

305305
To make requests to undocumented endpoints, you can make requests using `client.get`, `client.post`, and other
306-
http verbs. Options on the client will be respected (such as retries) will be respected when making this
307-
request.
306+
http verbs. Options on the client will be respected (such as retries) when making this request.
308307

309308
```py
310309
import httpx
@@ -376,7 +375,7 @@ with Steel() as client:
376375
This package generally follows [SemVer](https://semver.org/spec/v2.0.0.html) conventions, though certain backwards-incompatible changes may be released as minor versions:
377376

378377
1. Changes that only affect static types, without breaking runtime behavior.
379-
2. Changes to library internals which are technically public but not intended or documented for external use. _(Please open a GitHub issue to let us know if you are relying on such internals)_.
378+
2. Changes to library internals which are technically public but not intended or documented for external use. _(Please open a GitHub issue to let us know if you are relying on such internals.)_
380379
3. Changes that we do not expect to impact the vast majority of users in practice.
381380

382381
We take backwards-compatibility seriously and work hard to ensure you can rely on a smooth upgrade experience.

pyproject.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[project]
22
name = "steel-sdk"
3-
version = "0.1.0-beta.6"
3+
version = "0.1.0-beta.7"
44
description = "The official Python library for the steel API"
55
dynamic = ["readme"]
66
license = "Apache-2.0"

src/steel/_models.py

+4-4
Original file line numberDiff line numberDiff line change
@@ -179,14 +179,14 @@ def __str__(self) -> str:
179179
@classmethod
180180
@override
181181
def construct( # pyright: ignore[reportIncompatibleMethodOverride]
182-
cls: Type[ModelT],
182+
__cls: Type[ModelT],
183183
_fields_set: set[str] | None = None,
184184
**values: object,
185185
) -> ModelT:
186-
m = cls.__new__(cls)
186+
m = __cls.__new__(__cls)
187187
fields_values: dict[str, object] = {}
188188

189-
config = get_model_config(cls)
189+
config = get_model_config(__cls)
190190
populate_by_name = (
191191
config.allow_population_by_field_name
192192
if isinstance(config, _ConfigProtocol)
@@ -196,7 +196,7 @@ def construct( # pyright: ignore[reportIncompatibleMethodOverride]
196196
if _fields_set is None:
197197
_fields_set = set()
198198

199-
model_fields = get_model_fields(cls)
199+
model_fields = get_model_fields(__cls)
200200
for name, field in model_fields.items():
201201
key = field.alias
202202
if key is None or (key not in values and populate_by_name):

src/steel/_version.py

+1-1
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.1.0-beta.6" # x-release-please-version
4+
__version__ = "0.1.0-beta.7" # x-release-please-version

tests/test_models.py

+10
Original file line numberDiff line numberDiff line change
@@ -844,3 +844,13 @@ class Model(BaseModel):
844844
assert m.alias == "foo"
845845
assert isinstance(m.union, str)
846846
assert m.union == "bar"
847+
848+
849+
@pytest.mark.skipif(not PYDANTIC_V2, reason="TypeAliasType is not supported in Pydantic v1")
850+
def test_field_named_cls() -> None:
851+
class Model(BaseModel):
852+
cls: str
853+
854+
m = construct_type(value={"cls": "foo"}, type_=Model)
855+
assert isinstance(m, Model)
856+
assert isinstance(m.cls, str)

0 commit comments

Comments
 (0)