Skip to content

release: 0.26.0 #560

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

Merged
merged 7 commits into from
Mar 4, 2025
Merged
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
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
".": "0.25.0"
".": "0.26.0"
}
21 changes: 21 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,26 @@
# Changelog

## 0.26.0 (2025-03-04)

Full Changelog: [v0.25.0...v0.26.0](https://github.com/runloopai/api-client-python/compare/v0.25.0...v0.26.0)

### Features

* cp ([4675ff3](https://github.com/runloopai/api-client-python/commit/4675ff37c7bfbce34db1a2b1a2b95bfc90407c57))
* cp ([a0e7c26](https://github.com/runloopai/api-client-python/commit/a0e7c26d92b1f846e8e27ad80b4bcc3eec9a6b4c))
* cp ([2ed5f7a](https://github.com/runloopai/api-client-python/commit/2ed5f7a944582d29a5284ddc7ff455832dede033))


### Chores

* **docs:** update client docstring ([#559](https://github.com/runloopai/api-client-python/issues/559)) ([aae64ef](https://github.com/runloopai/api-client-python/commit/aae64ef8fa7a03db23695b7dae48dba6d7b1d1e3))
* **internal:** remove unused http client options forwarding ([#561](https://github.com/runloopai/api-client-python/issues/561)) ([39fcd59](https://github.com/runloopai/api-client-python/commit/39fcd59664517ad7a088a087011cb38f1d9a58ae))


### Documentation

* update URLs from stainlessapi.com to stainless.com ([#558](https://github.com/runloopai/api-client-python/issues/558)) ([cc0b37d](https://github.com/runloopai/api-client-python/commit/cc0b37d74d46c7796ae72a8d496ee733e50b70c0))

## 0.25.0 (2025-02-26)

Full Changelog: [v0.24.0...v0.25.0](https://github.com/runloopai/api-client-python/compare/v0.24.0...v0.25.0)
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ The Runloop Python library provides convenient access to the Runloop REST API fr
application. The library includes type definitions for all request params and response fields,
and offers both synchronous and asynchronous clients powered by [httpx](https://github.com/encode/httpx).

It is generated with [Stainless](https://www.stainlessapi.com/).
It is generated with [Stainless](https://www.stainless.com/).

## Documentation

Expand Down
4 changes: 2 additions & 2 deletions SECURITY.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@

## Reporting Security Issues

This SDK is generated by [Stainless Software Inc](http://stainlessapi.com). Stainless takes security seriously, and encourages you to report any security vulnerability promptly so that appropriate action can be taken.
This SDK is generated by [Stainless Software Inc](http://stainless.com). Stainless takes security seriously, and encourages you to report any security vulnerability promptly so that appropriate action can be taken.

To report a security issue, please contact the Stainless team at security@stainlessapi.com.
To report a security issue, please contact the Stainless team at security@stainless.com.

## Responsible Disclosure

Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[project]
name = "runloop_api_client"
version = "0.25.0"
version = "0.26.0"
description = "The official Python library for the runloop API"
dynamic = ["readme"]
license = "MIT"
Expand Down
97 changes: 1 addition & 96 deletions src/runloop_api_client/_base_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
import inspect
import logging
import platform
import warnings
import email.utils
from types import TracebackType
from random import random
Expand All @@ -36,7 +35,7 @@
import httpx
import distro
import pydantic
from httpx import URL, Limits
from httpx import URL
from pydantic import PrivateAttr

from . import _exceptions
Expand All @@ -51,13 +50,10 @@
Timeout,
NotGiven,
ResponseT,
Transport,
AnyMapping,
PostParser,
ProxiesTypes,
RequestFiles,
HttpxSendArgs,
AsyncTransport,
RequestOptions,
HttpxRequestFiles,
ModelBuilderProtocol,
Expand Down Expand Up @@ -337,9 +333,6 @@ class BaseClient(Generic[_HttpxClientT, _DefaultStreamT]):
_base_url: URL
max_retries: int
timeout: Union[float, Timeout, None]
_limits: httpx.Limits
_proxies: ProxiesTypes | None
_transport: Transport | AsyncTransport | None
_strict_response_validation: bool
_idempotency_header: str | None
_default_stream_cls: type[_DefaultStreamT] | None = None
Expand All @@ -352,19 +345,13 @@ def __init__(
_strict_response_validation: bool,
max_retries: int = DEFAULT_MAX_RETRIES,
timeout: float | Timeout | None = DEFAULT_TIMEOUT,
limits: httpx.Limits,
transport: Transport | AsyncTransport | None,
proxies: ProxiesTypes | None,
custom_headers: Mapping[str, str] | None = None,
custom_query: Mapping[str, object] | None = None,
) -> None:
self._version = version
self._base_url = self._enforce_trailing_slash(URL(base_url))
self.max_retries = max_retries
self.timeout = timeout
self._limits = limits
self._proxies = proxies
self._transport = transport
self._custom_headers = custom_headers or {}
self._custom_query = custom_query or {}
self._strict_response_validation = _strict_response_validation
Expand Down Expand Up @@ -800,46 +787,11 @@ def __init__(
base_url: str | URL,
max_retries: int = DEFAULT_MAX_RETRIES,
timeout: float | Timeout | None | NotGiven = NOT_GIVEN,
transport: Transport | None = None,
proxies: ProxiesTypes | None = None,
limits: Limits | None = None,
http_client: httpx.Client | None = None,
custom_headers: Mapping[str, str] | None = None,
custom_query: Mapping[str, object] | None = None,
_strict_response_validation: bool,
) -> None:
kwargs: dict[str, Any] = {}
if limits is not None:
warnings.warn(
"The `connection_pool_limits` argument is deprecated. The `http_client` argument should be passed instead",
category=DeprecationWarning,
stacklevel=3,
)
if http_client is not None:
raise ValueError("The `http_client` argument is mutually exclusive with `connection_pool_limits`")
else:
limits = DEFAULT_CONNECTION_LIMITS

if transport is not None:
kwargs["transport"] = transport
warnings.warn(
"The `transport` argument is deprecated. The `http_client` argument should be passed instead",
category=DeprecationWarning,
stacklevel=3,
)
if http_client is not None:
raise ValueError("The `http_client` argument is mutually exclusive with `transport`")

if proxies is not None:
kwargs["proxies"] = proxies
warnings.warn(
"The `proxies` argument is deprecated. The `http_client` argument should be passed instead",
category=DeprecationWarning,
stacklevel=3,
)
if http_client is not None:
raise ValueError("The `http_client` argument is mutually exclusive with `proxies`")

if not is_given(timeout):
# if the user passed in a custom http client with a non-default
# timeout set then we use that timeout.
Expand All @@ -860,12 +812,9 @@ def __init__(

super().__init__(
version=version,
limits=limits,
# cast to a valid type because mypy doesn't understand our type narrowing
timeout=cast(Timeout, timeout),
proxies=proxies,
base_url=base_url,
transport=transport,
max_retries=max_retries,
custom_query=custom_query,
custom_headers=custom_headers,
Expand All @@ -875,9 +824,6 @@ def __init__(
base_url=base_url,
# cast to a valid type because mypy doesn't understand our type narrowing
timeout=cast(Timeout, timeout),
limits=limits,
follow_redirects=True,
**kwargs, # type: ignore
)

def is_closed(self) -> bool:
Expand Down Expand Up @@ -1372,45 +1318,10 @@ def __init__(
_strict_response_validation: bool,
max_retries: int = DEFAULT_MAX_RETRIES,
timeout: float | Timeout | None | NotGiven = NOT_GIVEN,
transport: AsyncTransport | None = None,
proxies: ProxiesTypes | None = None,
limits: Limits | None = None,
http_client: httpx.AsyncClient | None = None,
custom_headers: Mapping[str, str] | None = None,
custom_query: Mapping[str, object] | None = None,
) -> None:
kwargs: dict[str, Any] = {}
if limits is not None:
warnings.warn(
"The `connection_pool_limits` argument is deprecated. The `http_client` argument should be passed instead",
category=DeprecationWarning,
stacklevel=3,
)
if http_client is not None:
raise ValueError("The `http_client` argument is mutually exclusive with `connection_pool_limits`")
else:
limits = DEFAULT_CONNECTION_LIMITS

if transport is not None:
kwargs["transport"] = transport
warnings.warn(
"The `transport` argument is deprecated. The `http_client` argument should be passed instead",
category=DeprecationWarning,
stacklevel=3,
)
if http_client is not None:
raise ValueError("The `http_client` argument is mutually exclusive with `transport`")

if proxies is not None:
kwargs["proxies"] = proxies
warnings.warn(
"The `proxies` argument is deprecated. The `http_client` argument should be passed instead",
category=DeprecationWarning,
stacklevel=3,
)
if http_client is not None:
raise ValueError("The `http_client` argument is mutually exclusive with `proxies`")

if not is_given(timeout):
# if the user passed in a custom http client with a non-default
# timeout set then we use that timeout.
Expand All @@ -1432,11 +1343,8 @@ def __init__(
super().__init__(
version=version,
base_url=base_url,
limits=limits,
# cast to a valid type because mypy doesn't understand our type narrowing
timeout=cast(Timeout, timeout),
proxies=proxies,
transport=transport,
max_retries=max_retries,
custom_query=custom_query,
custom_headers=custom_headers,
Expand All @@ -1446,9 +1354,6 @@ def __init__(
base_url=base_url,
# cast to a valid type because mypy doesn't understand our type narrowing
timeout=cast(Timeout, timeout),
limits=limits,
follow_redirects=True,
**kwargs, # type: ignore
)

def is_closed(self) -> bool:
Expand Down
4 changes: 2 additions & 2 deletions src/runloop_api_client/_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ def __init__(
# part of our public interface in the future.
_strict_response_validation: bool = False,
) -> None:
"""Construct a new synchronous runloop client instance.
"""Construct a new synchronous Runloop client instance.

This automatically infers the `bearer_token` argument from the `RUNLOOP_API_KEY` environment variable if it is not provided.
"""
Expand Down Expand Up @@ -252,7 +252,7 @@ def __init__(
# part of our public interface in the future.
_strict_response_validation: bool = False,
) -> None:
"""Construct a new async runloop client instance.
"""Construct a new async AsyncRunloop client instance.

This automatically infers the `bearer_token` argument from the `RUNLOOP_API_KEY` environment variable if it is not provided.
"""
Expand Down
2 changes: 1 addition & 1 deletion src/runloop_api_client/_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__ = "runloop_api_client"
__version__ = "0.25.0" # x-release-please-version
__version__ = "0.26.0" # x-release-please-version
4 changes: 2 additions & 2 deletions src/runloop_api_client/resources/blueprints.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,11 @@
async_to_raw_response_wrapper,
async_to_streamed_response_wrapper,
)
from ..pagination import SyncBlueprintsCursorIDPage, AsyncBlueprintsCursorIDPage
from .._exceptions import RunloopError
from ..lib.polling import PollingConfig, poll_until
from ..lib.polling_async import async_poll_until
from ..pagination import SyncBlueprintsCursorIDPage, AsyncBlueprintsCursorIDPage
from .._base_client import AsyncPaginator, make_request_options
from ..lib.polling_async import async_poll_until
from ..types.blueprint_view import BlueprintView
from ..types.blueprint_preview_view import BlueprintPreviewView
from ..types.blueprint_build_logs_list_view import BlueprintBuildLogsListView
Expand Down
2 changes: 1 addition & 1 deletion src/runloop_api_client/resources/devboxes/devboxes.py
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,6 @@
)
from ..._exceptions import RunloopError
from ...lib.polling import PollingConfig, poll_until
from ...lib.polling_async import async_poll_until
from ..._base_client import AsyncPaginator, make_request_options
from .disk_snapshots import (
DiskSnapshotsResource,
Expand All @@ -103,6 +102,7 @@
DiskSnapshotsResourceWithStreamingResponse,
AsyncDiskSnapshotsResourceWithStreamingResponse,
)
from ...lib.polling_async import async_poll_until
from ...types.devbox_view import DevboxView
from ...types.devbox_tunnel_view import DevboxTunnelView
from ...types.devbox_snapshot_view import DevboxSnapshotView
Expand Down
6 changes: 5 additions & 1 deletion src/runloop_api_client/resources/scenarios/scenarios.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@
maybe_transform,
async_maybe_transform,
)
from ...lib.polling import PollingConfig
from ..._compat import cached_property
from ..._resource import SyncAPIResource, AsyncAPIResource
from ..._response import (
Expand All @@ -44,6 +43,7 @@
async_to_streamed_response_wrapper,
)
from ...pagination import SyncScenariosCursorIDPage, AsyncScenariosCursorIDPage
from ...lib.polling import PollingConfig
from ..._base_client import AsyncPaginator, make_request_options
from ...types.scenario_view import ScenarioView
from ...types.scenario_run_view import ScenarioRunView
Expand Down Expand Up @@ -422,6 +422,7 @@ def start_run_and_await_env_ready(
*,
scenario_id: str,
benchmark_run_id: Optional[str] | NotGiven = NOT_GIVEN,
metadata: Optional[Dict[str, str]] | NotGiven = NOT_GIVEN,
run_name: Optional[str] | NotGiven = NOT_GIVEN,
polling_config: PollingConfig | None = None,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
Expand Down Expand Up @@ -455,6 +456,7 @@ def start_run_and_await_env_ready(
run = self.start_run(
scenario_id=scenario_id,
benchmark_run_id=benchmark_run_id,
metadata=metadata,
run_name=run_name,
extra_headers=extra_headers,
extra_query=extra_query,
Expand Down Expand Up @@ -842,6 +844,7 @@ async def start_run_and_await_env_ready(
self,
scenario_id: str,
benchmark_run_id: Optional[str] | NotGiven = NOT_GIVEN,
metadata: Optional[Dict[str, str]] | NotGiven = NOT_GIVEN,
run_name: Optional[str] | NotGiven = NOT_GIVEN,
polling_config: PollingConfig | None = None,
) -> ScenarioRunView:
Expand All @@ -863,6 +866,7 @@ async def start_run_and_await_env_ready(
run = await self.start_run(
scenario_id=scenario_id,
benchmark_run_id=benchmark_run_id,
metadata=metadata,
run_name=run_name,
)

Expand Down
Loading
Loading