Skip to content

Commit 62c46af

Browse files
authored
Merge pull request #39 from hubmapconsortium/release-please--branches--main--changes--next
release: 1.0.0-alpha.18
2 parents d8eec00 + 1e1b4b0 commit 62c46af

File tree

6 files changed

+23
-8
lines changed

6 files changed

+23
-8
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.0.0-alpha.17"
2+
".": "1.0.0-alpha.18"
33
}

CHANGELOG.md

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

3+
## 1.0.0-alpha.18 (2025-07-12)
4+
5+
Full Changelog: [v1.0.0-alpha.17...v1.0.0-alpha.18](https://github.com/hubmapconsortium/search-python-sdk/compare/v1.0.0-alpha.17...v1.0.0-alpha.18)
6+
7+
### Bug Fixes
8+
9+
* **client:** don't send Content-Type header on GET requests ([1898678](https://github.com/hubmapconsortium/search-python-sdk/commit/18986789c246be8b94a66875b68cf47af0c774c0))
10+
311
## 1.0.0-alpha.17 (2025-07-11)
412

513
Full Changelog: [v1.0.0-alpha.16...v1.0.0-alpha.17](https://github.com/hubmapconsortium/search-python-sdk/compare/v1.0.0-alpha.16...v1.0.0-alpha.17)

pyproject.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[project]
22
name = "hubmap_search_sdk"
3-
version = "1.0.0-alpha.17"
3+
version = "1.0.0-alpha.18"
44
description = "The official Python library for the hubmap-search-sdk API"
55
dynamic = ["readme"]
66
license = "MIT"
@@ -39,7 +39,7 @@ Homepage = "https://github.com/hubmapconsortium/search-python-sdk"
3939
Repository = "https://github.com/hubmapconsortium/search-python-sdk"
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/hubmap_search_sdk/_base_client.py

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

535+
is_body_allowed = options.method.lower() != "get"
536+
537+
if is_body_allowed:
538+
kwargs["json"] = json_data if is_given(json_data) else None
539+
kwargs["files"] = files
540+
else:
541+
headers.pop("Content-Type", None)
542+
kwargs.pop("data", None)
543+
535544
# TODO: report this error to httpx
536545
return self._client.build_request( # pyright: ignore[reportUnknownMemberType]
537546
headers=headers,
@@ -543,8 +552,6 @@ def _build_request(
543552
# so that passing a `TypedDict` doesn't cause an error.
544553
# https://github.com/microsoft/pyright/issues/3526#event-6715453066
545554
params=self.qs.stringify(cast(Mapping[str, Any], params)) if params else None,
546-
json=json_data if is_given(json_data) else None,
547-
files=files,
548555
**kwargs,
549556
)
550557

src/hubmap_search_sdk/_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__ = "hubmap_search_sdk"
4-
__version__ = "1.0.0-alpha.17" # x-release-please-version
4+
__version__ = "1.0.0-alpha.18" # x-release-please-version

tests/test_client.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -472,7 +472,7 @@ def test_request_extra_query(self) -> None:
472472
def test_multipart_repeating_array(self, client: HubmapSearchSDK) -> None:
473473
request = client._build_request(
474474
FinalRequestOptions.construct(
475-
method="get",
475+
method="post",
476476
url="/foo",
477477
headers={"Content-Type": "multipart/form-data; boundary=6b7ba517decee4a450543ea6ae821c82"},
478478
json_data={"array": ["foo", "bar"]},
@@ -1300,7 +1300,7 @@ def test_request_extra_query(self) -> None:
13001300
def test_multipart_repeating_array(self, async_client: AsyncHubmapSearchSDK) -> None:
13011301
request = async_client._build_request(
13021302
FinalRequestOptions.construct(
1303-
method="get",
1303+
method="post",
13041304
url="/foo",
13051305
headers={"Content-Type": "multipart/form-data; boundary=6b7ba517decee4a450543ea6ae821c82"},
13061306
json_data={"array": ["foo", "bar"]},

0 commit comments

Comments
 (0)