Skip to content

Commit 2677a96

Browse files
Merge pull request #307 from OneBusAway/release-please--branches--main--changes--next
release: 1.13.5
2 parents 2aeccdd + add797a commit 2677a96

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.13.4"
2+
".": "1.13.5"
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.13.5 (2025-07-12)
4+
5+
Full Changelog: [v1.13.4...v1.13.5](https://github.com/OneBusAway/python-sdk/compare/v1.13.4...v1.13.5)
6+
7+
### Bug Fixes
8+
9+
* **client:** don't send Content-Type header on GET requests ([935e2d2](https://github.com/OneBusAway/python-sdk/commit/935e2d25ec8736de5b30d7653c2e85fd5620a45d))
10+
11+
12+
### Chores
13+
14+
* **readme:** fix version rendering on pypi ([e29e75d](https://github.com/OneBusAway/python-sdk/commit/e29e75dcc69ffc9b0c434cf556cfa9b5b374d7a4))
15+
316
## 1.13.4 (2025-07-10)
417

518
Full Changelog: [v1.13.3...v1.13.4](https://github.com/OneBusAway/python-sdk/compare/v1.13.3...v1.13.4)

README.md

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

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

56

67
The Onebusaway SDK Python library provides convenient access to the Onebusaway SDK REST API from any Python 3.8+

pyproject.toml

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

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

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

src/onebusaway/_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__ = "onebusaway"
4-
__version__ = "1.13.4" # x-release-please-version
4+
__version__ = "1.13.5" # x-release-please-version

tests/test_client.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -455,7 +455,7 @@ def test_request_extra_query(self) -> None:
455455
def test_multipart_repeating_array(self, client: OnebusawaySDK) -> None:
456456
request = client._build_request(
457457
FinalRequestOptions.construct(
458-
method="get",
458+
method="post",
459459
url="/foo",
460460
headers={"Content-Type": "multipart/form-data; boundary=6b7ba517decee4a450543ea6ae821c82"},
461461
json_data={"array": ["foo", "bar"]},
@@ -1258,7 +1258,7 @@ def test_request_extra_query(self) -> None:
12581258
def test_multipart_repeating_array(self, async_client: AsyncOnebusawaySDK) -> None:
12591259
request = async_client._build_request(
12601260
FinalRequestOptions.construct(
1261-
method="get",
1261+
method="post",
12621262
url="/foo",
12631263
headers={"Content-Type": "multipart/form-data; boundary=6b7ba517decee4a450543ea6ae821c82"},
12641264
json_data={"array": ["foo", "bar"]},

0 commit comments

Comments
 (0)