Skip to content

Commit 879cf19

Browse files
release: 1.30.3 (#666)
* chore(readme): fix version rendering on pypi * fix(client): don't send Content-Type header on GET requests * release: 1.30.3 --------- Co-authored-by: stainless-app[bot] <142633134+stainless-app[bot]@users.noreply.github.com>
1 parent 014a845 commit 879cf19

File tree

7 files changed

+30
-9
lines changed

7 files changed

+30
-9
lines changed

.release-please-manifest.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
{
2-
".": "1.30.2"
2+
".": "1.30.3"
33
}

CHANGELOG.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,18 @@
11
# Changelog
22

3+
## 1.30.3 (2025-07-11)
4+
5+
Full Changelog: [v1.30.2...v1.30.3](https://github.com/Finch-API/finch-api-python/compare/v1.30.2...v1.30.3)
6+
7+
### Bug Fixes
8+
9+
* **client:** don't send Content-Type header on GET requests ([f1fd42e](https://github.com/Finch-API/finch-api-python/commit/f1fd42e0dd7b4818b3d7fb73e2907b65fbc3889a))
10+
11+
12+
### Chores
13+
14+
* **readme:** fix version rendering on pypi ([25058bc](https://github.com/Finch-API/finch-api-python/commit/25058bcdc9cfc70711c709bf452fb8a9819a571d))
15+
316
## 1.30.2 (2025-07-09)
417

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

README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
# Finch Python API library
22

3-
[![PyPI version](<https://img.shields.io/pypi/v/finch-api.svg?label=pypi%20(stable)>)](https://pypi.org/project/finch-api/)
3+
<!-- prettier-ignore -->
4+
[![PyPI version](https://img.shields.io/pypi/v/finch-api.svg?label=pypi%20(stable))](https://pypi.org/project/finch-api/)
45

56
The Finch Python library provides convenient access to the Finch REST API from any Python 3.8+
67
application. The library includes type definitions for all request params and response fields,

pyproject.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[project]
22
name = "finch-api"
3-
version = "1.30.2"
3+
version = "1.30.3"
44
description = "The official Python library for the Finch API"
55
dynamic = ["readme"]
66
license = "Apache-2.0"
@@ -39,7 +39,7 @@ Homepage = "https://github.com/Finch-API/finch-api-python"
3939
Repository = "https://github.com/Finch-API/finch-api-python"
4040

4141
[project.optional-dependencies]
42-
aiohttp = ["aiohttp", "httpx_aiohttp>=0.1.6"]
42+
aiohttp = ["aiohttp", "httpx_aiohttp>=0.1.8"]
4343

4444
[tool.rye]
4545
managed = true

src/finch/_base_client.py

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -530,6 +530,15 @@ def _build_request(
530530
# work around https://github.com/encode/httpx/discussions/2880
531531
kwargs["extensions"] = {"sni_hostname": prepared_url.host.replace("_", "-")}
532532

533+
is_body_allowed = options.method.lower() != "get"
534+
535+
if is_body_allowed:
536+
kwargs["json"] = json_data if is_given(json_data) else None
537+
kwargs["files"] = files
538+
else:
539+
headers.pop("Content-Type", None)
540+
kwargs.pop("data", None)
541+
533542
# TODO: report this error to httpx
534543
return self._client.build_request( # pyright: ignore[reportUnknownMemberType]
535544
headers=headers,
@@ -541,8 +550,6 @@ def _build_request(
541550
# so that passing a `TypedDict` doesn't cause an error.
542551
# https://github.com/microsoft/pyright/issues/3526#event-6715453066
543552
params=self.qs.stringify(cast(Mapping[str, Any], params)) if params else None,
544-
json=json_data if is_given(json_data) else None,
545-
files=files,
546553
**kwargs,
547554
)
548555

src/finch/_version.py

Lines changed: 1 addition & 1 deletion
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__ = "finch"
4-
__version__ = "1.30.2" # x-release-please-version
4+
__version__ = "1.30.3" # x-release-please-version

tests/test_client.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -473,7 +473,7 @@ def test_request_extra_query(self) -> None:
473473
def test_multipart_repeating_array(self, client: Finch) -> None:
474474
request = client._build_request(
475475
FinalRequestOptions.construct(
476-
method="get",
476+
method="post",
477477
url="/foo",
478478
headers={"Content-Type": "multipart/form-data; boundary=6b7ba517decee4a450543ea6ae821c82"},
479479
json_data={"array": ["foo", "bar"]},
@@ -1312,7 +1312,7 @@ def test_request_extra_query(self) -> None:
13121312
def test_multipart_repeating_array(self, async_client: AsyncFinch) -> None:
13131313
request = async_client._build_request(
13141314
FinalRequestOptions.construct(
1315-
method="get",
1315+
method="post",
13161316
url="/foo",
13171317
headers={"Content-Type": "multipart/form-data; boundary=6b7ba517decee4a450543ea6ae821c82"},
13181318
json_data={"array": ["foo", "bar"]},

0 commit comments

Comments
 (0)