Skip to content
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

release: 0.5.0 #94

Open
wants to merge 10 commits into
base: main
Choose a base branch
from
2 changes: 1 addition & 1 deletion .release-please-manifest.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
".": "0.4.0"
".": "0.5.0"
}
2 changes: 1 addition & 1 deletion .stats.yml
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
configured_endpoints: 14
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/riza%2Friza-api-54bca763996117c90eb0d297dda154e35be304a72c8744910cb3d81a227bb638.yml
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/riza%2Friza-api-019f425125174f12c4b9ec17e9730910ee170a80735c3e09d808cb4ad3dae22d.yml
27 changes: 27 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,32 @@
# Changelog

## 0.5.0 (2025-01-09)

Full Changelog: [v0.4.0...v0.5.0](https://github.com/riza-io/riza-api-python/compare/v0.4.0...v0.5.0)

### Features

* **api:** api update ([#98](https://github.com/riza-io/riza-api-python/issues/98)) ([f7f7d5f](https://github.com/riza-io/riza-api-python/commit/f7f7d5f97e98b6b6ab7c6f83322c76ba732a4ca7))


### Bug Fixes

* **client:** only call .close() when needed ([#99](https://github.com/riza-io/riza-api-python/issues/99)) ([2f1bc2d](https://github.com/riza-io/riza-api-python/commit/2f1bc2d99cc4abf2f1c5dcb37b8c560f466b0eae))


### Chores

* add missing isclass check ([#96](https://github.com/riza-io/riza-api-python/issues/96)) ([eb92ef8](https://github.com/riza-io/riza-api-python/commit/eb92ef8ac93da94d0dd5ce52b985f8732a5dc81f))
* **client:** simplify `Optional[object]` to just `object` ([#95](https://github.com/riza-io/riza-api-python/issues/95)) ([3f86041](https://github.com/riza-io/riza-api-python/commit/3f86041e44d871aeab2f6986d2f1702ddf0a9515))
* **internal:** bump httpx dependency ([#97](https://github.com/riza-io/riza-api-python/issues/97)) ([a68c310](https://github.com/riza-io/riza-api-python/commit/a68c310a4745d94238e5ef8af46fc2f2dbd3e5ab))
* **internal:** codegen related update ([#101](https://github.com/riza-io/riza-api-python/issues/101)) ([cc3e865](https://github.com/riza-io/riza-api-python/commit/cc3e8654246ab7afdd0f887f1de7b25c651e59bd))
* **internal:** codegen related update ([#93](https://github.com/riza-io/riza-api-python/issues/93)) ([f5ad741](https://github.com/riza-io/riza-api-python/commit/f5ad74129fdfc41d5355cba9e0c8f49912cdb0c4))


### Documentation

* fix typos ([#100](https://github.com/riza-io/riza-api-python/issues/100)) ([aa496ac](https://github.com/riza-io/riza-api-python/commit/aa496acaa98ecf9e04acf2e8a1b1160ac18d51bf))

## 0.4.0 (2024-12-18)

Full Changelog: [v0.3.0...v0.4.0](https://github.com/riza-io/riza-api-python/compare/v0.3.0...v0.4.0)
Expand Down
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@
same "printed page" as the copyright notice for easier
identification within third-party archives.

Copyright 2024 Riza
Copyright 2025 Riza

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
Expand Down
7 changes: 3 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ except rizaio.APIStatusError as e:
print(e.response)
```

Error codes are as followed:
Error codes are as follows:

| Status Code | Error Type |
| ----------- | -------------------------- |
Expand Down Expand Up @@ -253,8 +253,7 @@ If you need to access undocumented endpoints, params, or response properties, th
#### Undocumented endpoints

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

```py
import httpx
Expand Down Expand Up @@ -326,7 +325,7 @@ with Riza() as client:
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:

1. Changes that only affect static types, without breaking runtime behavior.
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)_.
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.)_
3. Changes that we do not expect to impact the vast majority of users in practice.

We take backwards-compatibility seriously and work hard to ensure you can rely on a smooth upgrade experience.
Expand Down
4 changes: 2 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[project]
name = "rizaio"
version = "0.4.0"
version = "0.5.0"
description = "The official Python library for the riza API"
dynamic = ["readme"]
license = "Apache-2.0"
Expand Down Expand Up @@ -54,7 +54,7 @@ dev-dependencies = [
"dirty-equals>=0.6.0",
"importlib-metadata>=6.7.0",
"rich>=13.7.1",
"nest_asyncio==1.6.0"
"nest_asyncio==1.6.0",
]

[tool.rye.scripts]
Expand Down
5 changes: 2 additions & 3 deletions requirements-dev.lock
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ h11==0.14.0
# via httpcore
httpcore==1.0.2
# via httpx
httpx==0.25.2
httpx==0.28.1
# via respx
# via rizaio
idna==3.4
Expand Down Expand Up @@ -76,7 +76,7 @@ python-dateutil==2.8.2
# via time-machine
pytz==2023.3.post1
# via dirty-equals
respx==0.20.2
respx==0.22.0
rich==13.7.1
ruff==0.6.9
setuptools==68.2.2
Expand All @@ -85,7 +85,6 @@ six==1.16.0
# via python-dateutil
sniffio==1.3.0
# via anyio
# via httpx
# via rizaio
time-machine==2.9.0
tomli==2.0.2
Expand Down
3 changes: 1 addition & 2 deletions requirements.lock
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ h11==0.14.0
# via httpcore
httpcore==1.0.2
# via httpx
httpx==0.25.2
httpx==0.28.1
# via rizaio
idna==3.4
# via anyio
Expand All @@ -36,7 +36,6 @@ pydantic-core==2.27.1
# via pydantic
sniffio==1.3.0
# via anyio
# via httpx
# via rizaio
typing-extensions==4.12.2
# via anyio
Expand Down
6 changes: 6 additions & 0 deletions src/rizaio/_base_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -767,6 +767,9 @@ def __init__(self, **kwargs: Any) -> None:

class SyncHttpxClientWrapper(DefaultHttpxClient):
def __del__(self) -> None:
if self.is_closed:
return

try:
self.close()
except Exception:
Expand Down Expand Up @@ -1334,6 +1337,9 @@ def __init__(self, **kwargs: Any) -> None:

class AsyncHttpxClientWrapper(DefaultAsyncHttpxClient):
def __del__(self) -> None:
if self.is_closed:
return

try:
# TODO(someday): support non asyncio runtimes here
asyncio.get_running_loop().create_task(self.aclose())
Expand Down
6 changes: 5 additions & 1 deletion src/rizaio/_models.py
Original file line number Diff line number Diff line change
Expand Up @@ -488,7 +488,11 @@ def construct_type(*, value: object, type_: object) -> object:
_, items_type = get_args(type_) # Dict[_, items_type]
return {key: construct_type(value=item, type_=items_type) for key, item in value.items()}

if not is_literal_type(type_) and (issubclass(origin, BaseModel) or issubclass(origin, GenericModel)):
if (
not is_literal_type(type_)
and inspect.isclass(origin)
and (issubclass(origin, BaseModel) or issubclass(origin, GenericModel))
):
if is_list(value):
return [cast(Any, type_).construct(**entry) if is_mapping(entry) else entry for entry in value]

Expand Down
2 changes: 1 addition & 1 deletion src/rizaio/_version.py
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__ = "rizaio"
__version__ = "0.4.0" # x-release-please-version
__version__ = "0.5.0" # x-release-please-version
4 changes: 2 additions & 2 deletions src/rizaio/resources/tools.py
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ def update(
*,
code: Optional[str] | NotGiven = NOT_GIVEN,
description: Optional[str] | NotGiven = NOT_GIVEN,
input_schema: Optional[object] | NotGiven = NOT_GIVEN,
input_schema: object | NotGiven = NOT_GIVEN,
language: Literal["PYTHON", "JAVASCRIPT", "TYPESCRIPT"] | NotGiven = NOT_GIVEN,
name: Optional[str] | NotGiven = NOT_GIVEN,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
Expand Down Expand Up @@ -314,7 +314,7 @@ async def update(
*,
code: Optional[str] | NotGiven = NOT_GIVEN,
description: Optional[str] | NotGiven = NOT_GIVEN,
input_schema: Optional[object] | NotGiven = NOT_GIVEN,
input_schema: object | NotGiven = NOT_GIVEN,
language: Literal["PYTHON", "JAVASCRIPT", "TYPESCRIPT"] | NotGiven = NOT_GIVEN,
name: Optional[str] | NotGiven = NOT_GIVEN,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
Expand Down
2 changes: 1 addition & 1 deletion src/rizaio/types/runtime.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
class ManifestFile(BaseModel):
contents: str

name: Literal["requirements.txt"]
name: Literal["requirements.txt", "package.json"]


class Runtime(BaseModel):
Expand Down
2 changes: 1 addition & 1 deletion src/rizaio/types/runtime_create_params.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,4 @@ class RuntimeCreateParams(TypedDict, total=False):
class ManifestFile(TypedDict, total=False):
contents: Required[str]

name: Required[Literal["requirements.txt"]]
name: Required[Literal["requirements.txt", "package.json"]]
2 changes: 1 addition & 1 deletion src/rizaio/types/runtimes/revision.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
class ManifestFile(BaseModel):
contents: str

name: Literal["requirements.txt"]
name: Literal["requirements.txt", "package.json"]


class Revision(BaseModel):
Expand Down
2 changes: 1 addition & 1 deletion src/rizaio/types/runtimes/revision_create_params.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,4 @@ class RevisionCreateParams(TypedDict, total=False):
class ManifestFile(TypedDict, total=False):
contents: Required[str]

name: Required[Literal["requirements.txt"]]
name: Required[Literal["requirements.txt", "package.json"]]
2 changes: 1 addition & 1 deletion src/rizaio/types/tool_update_params.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ class ToolUpdateParams(TypedDict, total=False):

description: Optional[str]

input_schema: Optional[object]
input_schema: object

language: Literal["PYTHON", "JAVASCRIPT", "TYPESCRIPT"]

Expand Down
Loading