Skip to content

Commit 8962801

Browse files
Merge pull request #300 from OneBusAway/release-please--branches--main--changes--next
release: 1.12.1
2 parents 902ddff + 915e214 commit 8962801

File tree

6 files changed

+38
-6
lines changed

6 files changed

+38
-6
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.12.0"
2+
".": "1.12.1"
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.12.1 (2025-06-13)
4+
5+
Full Changelog: [v1.12.0...v1.12.1](https://github.com/OneBusAway/python-sdk/compare/v1.12.0...v1.12.1)
6+
7+
### Bug Fixes
8+
9+
* **client:** correctly parse binary response | stream ([4bc049c](https://github.com/OneBusAway/python-sdk/commit/4bc049ce0a36680434f5570fd38f3ca673250bba))
10+
11+
12+
### Chores
13+
14+
* **tests:** run tests in parallel ([1329bbe](https://github.com/OneBusAway/python-sdk/commit/1329bbe39e76943fe51efea63dc5ee7f85154135))
15+
316
## 1.12.0 (2025-06-03)
417

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

pyproject.toml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[project]
22
name = "onebusaway"
3-
version = "1.12.0"
3+
version = "1.12.1"
44
description = "The official Python library for the onebusaway-sdk API"
55
dynamic = ["readme"]
66
license = "Apache-2.0"
@@ -54,6 +54,7 @@ dev-dependencies = [
5454
"importlib-metadata>=6.7.0",
5555
"rich>=13.7.1",
5656
"nest_asyncio==1.6.0",
57+
"pytest-xdist>=3.6.1",
5758
]
5859

5960
[tool.rye.scripts]
@@ -125,7 +126,7 @@ replacement = '[\1](https://github.com/OneBusAway/python-sdk/tree/main/\g<2>)'
125126

126127
[tool.pytest.ini_options]
127128
testpaths = ["tests"]
128-
addopts = "--tb=short"
129+
addopts = "--tb=short -n auto"
129130
xfail_strict = true
130131
asyncio_mode = "auto"
131132
asyncio_default_fixture_loop_scope = "session"

requirements-dev.lock

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,8 @@ distro==1.8.0
3030
exceptiongroup==1.2.2
3131
# via anyio
3232
# via pytest
33+
execnet==2.1.1
34+
# via pytest-xdist
3335
filelock==3.12.4
3436
# via virtualenv
3537
h11==0.14.0
@@ -72,7 +74,9 @@ pygments==2.18.0
7274
pyright==1.1.399
7375
pytest==8.3.3
7476
# via pytest-asyncio
77+
# via pytest-xdist
7578
pytest-asyncio==0.24.0
79+
pytest-xdist==3.7.0
7680
python-dateutil==2.8.2
7781
# via time-machine
7882
pytz==2023.3.post1

src/onebusaway/_base_client.py

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1071,7 +1071,14 @@ def _process_response(
10711071
) -> ResponseT:
10721072
origin = get_origin(cast_to) or cast_to
10731073

1074-
if inspect.isclass(origin) and issubclass(origin, BaseAPIResponse):
1074+
if (
1075+
inspect.isclass(origin)
1076+
and issubclass(origin, BaseAPIResponse)
1077+
# we only want to actually return the custom BaseAPIResponse class if we're
1078+
# returning the raw response, or if we're not streaming SSE, as if we're streaming
1079+
# SSE then `cast_to` doesn't actively reflect the type we need to parse into
1080+
and (not stream or bool(response.request.headers.get(RAW_RESPONSE_HEADER)))
1081+
):
10751082
if not issubclass(origin, APIResponse):
10761083
raise TypeError(f"API Response types must subclass {APIResponse}; Received {origin}")
10771084

@@ -1574,7 +1581,14 @@ async def _process_response(
15741581
) -> ResponseT:
15751582
origin = get_origin(cast_to) or cast_to
15761583

1577-
if inspect.isclass(origin) and issubclass(origin, BaseAPIResponse):
1584+
if (
1585+
inspect.isclass(origin)
1586+
and issubclass(origin, BaseAPIResponse)
1587+
# we only want to actually return the custom BaseAPIResponse class if we're
1588+
# returning the raw response, or if we're not streaming SSE, as if we're streaming
1589+
# SSE then `cast_to` doesn't actively reflect the type we need to parse into
1590+
and (not stream or bool(response.request.headers.get(RAW_RESPONSE_HEADER)))
1591+
):
15781592
if not issubclass(origin, AsyncAPIResponse):
15791593
raise TypeError(f"API Response types must subclass {AsyncAPIResponse}; Received {origin}")
15801594

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.12.0" # x-release-please-version
4+
__version__ = "1.12.1" # x-release-please-version

0 commit comments

Comments
 (0)