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: 1.12.1 #555

Merged
merged 4 commits into from
Jan 7, 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 @@
{
".": "1.12.0"
".": "1.12.1"
}
10 changes: 10 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,15 @@
# Changelog

## 1.12.1 (2025-01-07)

Full Changelog: [v1.12.0...v1.12.1](https://github.com/Finch-API/finch-api-python/compare/v1.12.0...v1.12.1)

### Chores

* add missing isclass check ([#556](https://github.com/Finch-API/finch-api-python/issues/556)) ([4b82e52](https://github.com/Finch-API/finch-api-python/commit/4b82e52af15f1f22f5b6e0212700ac301d0bc782))
* **internal:** bump httpx dependency ([#557](https://github.com/Finch-API/finch-api-python/issues/557)) ([22b533f](https://github.com/Finch-API/finch-api-python/commit/22b533ff97e4931dfb5a71e1e2d783ab843d0115))
* **internal:** codegen related update ([#554](https://github.com/Finch-API/finch-api-python/issues/554)) ([5db22d6](https://github.com/Finch-API/finch-api-python/commit/5db22d66a864bac7e7caeae7d3f168cbd2d76c0d))

## 1.12.0 (2024-12-17)

Full Changelog: [v1.11.0...v1.12.0](https://github.com/Finch-API/finch-api-python/compare/v1.11.0...v1.12.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 Finch
Copyright 2025 Finch

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
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 = "finch-api"
version = "1.12.0"
version = "1.12.1"
description = "The official Python library for the Finch 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 finch-api
# via respx
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 @@ -86,7 +86,6 @@ six==1.16.0
sniffio==1.3.0
# via anyio
# via finch-api
# via httpx
time-machine==2.9.0
tomli==2.0.2
# via mypy
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 finch-api
idna==3.4
# via anyio
Expand All @@ -37,7 +37,6 @@ pydantic-core==2.27.1
sniffio==1.3.0
# via anyio
# via finch-api
# via httpx
typing-extensions==4.12.2
# via anyio
# via finch-api
Expand Down
6 changes: 5 additions & 1 deletion src/finch/_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/finch/_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__ = "finch"
__version__ = "1.12.0" # x-release-please-version
__version__ = "1.12.1" # x-release-please-version
25 changes: 25 additions & 0 deletions tests/test_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@

import httpx
import pytest
import packaging.version as version
from respx import MockRouter
from pydantic import ValidationError

Expand Down Expand Up @@ -643,6 +644,10 @@ def test_absolute_request_url(self, client: Finch) -> None:
)
assert request.url == "https://myapi.com/foo"

@pytest.mark.skipif(
version.parse(httpx.__version__) >= version.parse("0.28.0"),
reason="Test is only relevant for httpx versions < 0.28.0",
)
def test_transport_option_is_deprecated(self) -> None:
with pytest.warns(
DeprecationWarning,
Expand Down Expand Up @@ -672,6 +677,10 @@ def test_transport_option_mutually_exclusive_with_http_client(self) -> None:
http_client=http_client,
)

@pytest.mark.skipif(
version.parse(httpx.__version__) >= version.parse("0.28.0"),
reason="Test is only relevant for httpx versions < 0.28.0",
)
def test_connection_pool_limits_option_is_deprecated(self) -> None:
with pytest.warns(
DeprecationWarning,
Expand Down Expand Up @@ -709,6 +718,10 @@ def test_connection_pool_limits_option_mutually_exclusive_with_http_client(self)
http_client=http_client,
)

@pytest.mark.skipif(
version.parse(httpx.__version__) >= version.parse("0.28.0"),
reason="Test is only relevant for httpx versions < 0.28.0",
)
def test_proxies_option_is_deprecated(self) -> None:
with pytest.warns(
DeprecationWarning,
Expand Down Expand Up @@ -1527,6 +1540,10 @@ def test_absolute_request_url(self, client: AsyncFinch) -> None:
)
assert request.url == "https://myapi.com/foo"

@pytest.mark.skipif(
version.parse(httpx.__version__) >= version.parse("0.28.0"),
reason="Test is only relevant for httpx versions < 0.28.0",
)
def test_transport_option_is_deprecated(self) -> None:
with pytest.warns(
DeprecationWarning,
Expand Down Expand Up @@ -1556,6 +1573,10 @@ async def test_transport_option_mutually_exclusive_with_http_client(self) -> Non
http_client=http_client,
)

@pytest.mark.skipif(
version.parse(httpx.__version__) >= version.parse("0.28.0"),
reason="Test is only relevant for httpx versions < 0.28.0",
)
def test_connection_pool_limits_option_is_deprecated(self) -> None:
with pytest.warns(
DeprecationWarning,
Expand Down Expand Up @@ -1593,6 +1614,10 @@ async def test_connection_pool_limits_option_mutually_exclusive_with_http_client
http_client=http_client,
)

@pytest.mark.skipif(
version.parse(httpx.__version__) >= version.parse("0.28.0"),
reason="Test is only relevant for httpx versions < 0.28.0",
)
def test_proxies_option_is_deprecated(self) -> None:
with pytest.warns(
DeprecationWarning,
Expand Down
Loading