Skip to content

Commit 8e1da21

Browse files
Merge pull request #335 from OneBusAway/release-please--branches--main--changes--next
release: 1.19.4
2 parents ad36d1c + 2326c9e commit 8e1da21

File tree

7 files changed

+27
-6
lines changed

7 files changed

+27
-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.19.3"
2+
".": "1.19.4"
33
}

CHANGELOG.md

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

3+
## 1.19.4 (2026-02-24)
4+
5+
Full Changelog: [v1.19.3...v1.19.4](https://github.com/OneBusAway/python-sdk/compare/v1.19.3...v1.19.4)
6+
7+
### Chores
8+
9+
* **internal:** add request options to SSE classes ([82eb18f](https://github.com/OneBusAway/python-sdk/commit/82eb18f84a795101b3d593a4d0ca0ffe8c2f61ad))
10+
* **internal:** make `test_proxy_environment_variables` more resilient ([8d549cc](https://github.com/OneBusAway/python-sdk/commit/8d549cc7fd49514167e74d5c7f6889e7681223bd))
11+
312
## 1.19.3 (2026-02-20)
413

514
Full Changelog: [v1.19.2...v1.19.3](https://github.com/OneBusAway/python-sdk/compare/v1.19.2...v1.19.3)

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[project]
22
name = "onebusaway"
3-
version = "1.19.3"
3+
version = "1.19.4"
44
description = "The official Python library for the onebusaway-sdk API"
55
dynamic = ["readme"]
66
license = "Apache-2.0"

src/onebusaway/_response.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -152,6 +152,7 @@ def _parse(self, *, to: type[_T] | None = None) -> R | _T:
152152
),
153153
response=self.http_response,
154154
client=cast(Any, self._client),
155+
options=self._options,
155156
),
156157
)
157158

@@ -162,6 +163,7 @@ def _parse(self, *, to: type[_T] | None = None) -> R | _T:
162163
cast_to=extract_stream_chunk_type(self._stream_cls),
163164
response=self.http_response,
164165
client=cast(Any, self._client),
166+
options=self._options,
165167
),
166168
)
167169

@@ -175,6 +177,7 @@ def _parse(self, *, to: type[_T] | None = None) -> R | _T:
175177
cast_to=cast_to,
176178
response=self.http_response,
177179
client=cast(Any, self._client),
180+
options=self._options,
178181
),
179182
)
180183

src/onebusaway/_streaming.py

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
import json
55
import inspect
66
from types import TracebackType
7-
from typing import TYPE_CHECKING, Any, Generic, TypeVar, Iterator, AsyncIterator, cast
7+
from typing import TYPE_CHECKING, Any, Generic, TypeVar, Iterator, Optional, AsyncIterator, cast
88
from typing_extensions import Self, Protocol, TypeGuard, override, get_origin, runtime_checkable
99

1010
import httpx
@@ -13,6 +13,7 @@
1313

1414
if TYPE_CHECKING:
1515
from ._client import OnebusawaySDK, AsyncOnebusawaySDK
16+
from ._models import FinalRequestOptions
1617

1718

1819
_T = TypeVar("_T")
@@ -22,7 +23,7 @@ class Stream(Generic[_T]):
2223
"""Provides the core interface to iterate over a synchronous stream response."""
2324

2425
response: httpx.Response
25-
26+
_options: Optional[FinalRequestOptions] = None
2627
_decoder: SSEBytesDecoder
2728

2829
def __init__(
@@ -31,10 +32,12 @@ def __init__(
3132
cast_to: type[_T],
3233
response: httpx.Response,
3334
client: OnebusawaySDK,
35+
options: Optional[FinalRequestOptions] = None,
3436
) -> None:
3537
self.response = response
3638
self._cast_to = cast_to
3739
self._client = client
40+
self._options = options
3841
self._decoder = client._make_sse_decoder()
3942
self._iterator = self.__stream__()
4043

@@ -85,7 +88,7 @@ class AsyncStream(Generic[_T]):
8588
"""Provides the core interface to iterate over an asynchronous stream response."""
8689

8790
response: httpx.Response
88-
91+
_options: Optional[FinalRequestOptions] = None
8992
_decoder: SSEDecoder | SSEBytesDecoder
9093

9194
def __init__(
@@ -94,10 +97,12 @@ def __init__(
9497
cast_to: type[_T],
9598
response: httpx.Response,
9699
client: AsyncOnebusawaySDK,
100+
options: Optional[FinalRequestOptions] = None,
97101
) -> None:
98102
self.response = response
99103
self._cast_to = cast_to
100104
self._client = client
105+
self._options = options
101106
self._decoder = client._make_sse_decoder()
102107
self._iterator = self.__stream__()
103108

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

tests/test_client.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -953,6 +953,8 @@ def retry_handler(_request: httpx.Request) -> httpx.Response:
953953
def test_proxy_environment_variables(self, monkeypatch: pytest.MonkeyPatch) -> None:
954954
# Test that the proxy environment variables are set correctly
955955
monkeypatch.setenv("HTTPS_PROXY", "https://example.org")
956+
# Delete in case our environment has this set
957+
monkeypatch.delenv("HTTP_PROXY", raising=False)
956958

957959
client = DefaultHttpxClient()
958960

@@ -1856,6 +1858,8 @@ async def test_get_platform(self) -> None:
18561858
async def test_proxy_environment_variables(self, monkeypatch: pytest.MonkeyPatch) -> None:
18571859
# Test that the proxy environment variables are set correctly
18581860
monkeypatch.setenv("HTTPS_PROXY", "https://example.org")
1861+
# Delete in case our environment has this set
1862+
monkeypatch.delenv("HTTP_PROXY", raising=False)
18591863

18601864
client = DefaultAsyncHttpxClient()
18611865

0 commit comments

Comments
 (0)