Skip to content

Commit

Permalink
Update 2024-11-25 (#43)
Browse files Browse the repository at this point in the history
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
  • Loading branch information
friendli-bot and github-actions[bot] authored Nov 25, 2024
1 parent 6c4a14e commit 5fac75b
Show file tree
Hide file tree
Showing 8 changed files with 22 additions and 16 deletions.
4 changes: 2 additions & 2 deletions .speakeasy/gen.lock
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ management:
docVersion: v1
speakeasyVersion: 1.444.4
generationVersion: 2.461.4
releaseVersion: 0.3.13
configChecksum: b906d4f0de8bd0aca263d401d432c7ad
releaseVersion: 0.3.14
configChecksum: 9caaae27398ff88fcb2955bc2cc511ab
repoURL: https://github.com/friendliai/friendli-python-internal.git
installationURL: https://github.com/friendliai/friendli-python-internal.git
published: true
Expand Down
2 changes: 1 addition & 1 deletion .speakeasy/gen.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ generation:
oAuth2ClientCredentialsEnabled: true
oAuth2PasswordEnabled: true
python:
version: 0.3.13
version: 0.3.14
additionalDependencies:
dev: {}
main: {}
Expand Down
4 changes: 2 additions & 2 deletions .speakeasy/workflow.lock
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,15 @@ sources:
sourceBlobDigest: sha256:01c5796ed38c1c9608346165534b867074cc8a4423d5f20fc625e533c8d0726d
tags:
- latest
- speakeasy-sdk-regen-1732520393
- speakeasy-sdk-regen-1732521330
targets:
friendli:
source: Friendli-API-Schema
sourceNamespace: friendli-api-schema
sourceRevisionDigest: sha256:8a9aa9f4646d943b41f6f128466355f914dafcad8b6d323d2a3f65fdf79c665e
sourceBlobDigest: sha256:01c5796ed38c1c9608346165534b867074cc8a4423d5f20fc625e533c8d0726d
codeSamplesNamespace: friendli-api-schema-code-samples
codeSamplesRevisionDigest: sha256:b0cf4288ccf9ff393e01d9f15547bdb12b4bc2ea8512ab6c5f19a7eec727aef2
codeSamplesRevisionDigest: sha256:4ea2137927acd402632b834290f02286abd2e1de4b02f59e1f5f6d6565963b7c
workflow:
workflowVersion: 1.0.0
speakeasyVersion: latest
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "friendli"
version = "0.3.13"
version = "0.3.14"
description = "Python Client SDK Generated by Speakeasy."
authors = ["Speakeasy",]
readme = "README-PYPI.md"
Expand Down
2 changes: 1 addition & 1 deletion src/friendli/_version.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import importlib.metadata

__title__: str = "friendli"
__version__: str = "0.3.13"
__version__: str = "0.3.14"

try:
if __package__ is not None:
Expand Down
9 changes: 6 additions & 3 deletions src/friendli/errorhttpxclients.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
import httpx
from .httpclient import AsyncHttpClient, HttpClient
from typing import Any, NoReturn, Optional, Union, Type, Self
from typing import Any, NoReturn, Optional, Union, Type, TypeVar
from types import TracebackType

T = TypeVar("T", bound="ErrorThrowingSyncClient")
U = TypeVar("U", bound="ErrorThrowingAsyncClient")


class MethodUsedInWrongPlaceError(Exception):
def __init__(self, message):
Expand Down Expand Up @@ -44,7 +47,7 @@ def build_request(
) -> httpx.Request:
self._raise_error()

def __enter__(self: Self) -> Self:
def __enter__(self: T) -> T:
return self

def __exit__(
Expand Down Expand Up @@ -93,7 +96,7 @@ def build_request(
) -> httpx.Request:
self._raise_error()

async def __aenter__(self: Self) -> Self:
async def __aenter__(self: U) -> U:
return self

async def __aexit__(
Expand Down
11 changes: 7 additions & 4 deletions src/friendli/httpclient.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,13 @@
# pyright: reportReturnType = false
from typing_extensions import Protocol, runtime_checkable
import httpx
from typing import Any, Optional, Union, Type, Self
from typing import Any, Optional, Union, Type, TypeVar
from types import TracebackType

T = TypeVar("T", bound="HttpClient")
U = TypeVar("U", bound="AsyncHttpClient")


@runtime_checkable
class HttpClient(Protocol):
def send(
Expand Down Expand Up @@ -41,7 +45,7 @@ def build_request(
) -> httpx.Request:
pass

def __enter__(self: Self) -> Self:
def __enter__(self: T) -> T:
pass

def __exit__(
Expand All @@ -53,7 +57,6 @@ def __exit__(
pass



@runtime_checkable
class AsyncHttpClient(Protocol):
async def send(
Expand Down Expand Up @@ -89,7 +92,7 @@ def build_request(
) -> httpx.Request:
pass

async def __aenter__(self: Self) -> Self:
async def __aenter__(self: U) -> U:
pass

async def __aexit__(
Expand Down
4 changes: 2 additions & 2 deletions src/friendli/sdkconfiguration.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,9 @@ class SDKConfiguration:
server_idx: Optional[int] = 0
language: str = "python"
openapi_doc_version: str = "v1"
sdk_version: str = "0.3.13"
sdk_version: str = "0.3.14"
gen_version: str = "2.461.4"
user_agent: str = "speakeasy-sdk/python 0.3.13 2.461.4 v1 friendli"
user_agent: str = "speakeasy-sdk/python 0.3.14 2.461.4 v1 friendli"
retry_config: OptionalNullable[RetryConfig] = Field(default_factory=lambda: UNSET)
timeout_ms: Optional[int] = None

Expand Down

0 comments on commit 5fac75b

Please # to comment.