From 82eb18f84a795101b3d593a4d0ca0ffe8c2f61ad Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 24 Feb 2026 07:56:45 +0000 Subject: [PATCH 1/3] chore(internal): add request options to SSE classes --- src/onebusaway/_response.py | 3 +++ src/onebusaway/_streaming.py | 11 ++++++++--- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/src/onebusaway/_response.py b/src/onebusaway/_response.py index cc4f68e..5c83603 100644 --- a/src/onebusaway/_response.py +++ b/src/onebusaway/_response.py @@ -152,6 +152,7 @@ def _parse(self, *, to: type[_T] | None = None) -> R | _T: ), response=self.http_response, client=cast(Any, self._client), + options=self._options, ), ) @@ -162,6 +163,7 @@ def _parse(self, *, to: type[_T] | None = None) -> R | _T: cast_to=extract_stream_chunk_type(self._stream_cls), response=self.http_response, client=cast(Any, self._client), + options=self._options, ), ) @@ -175,6 +177,7 @@ def _parse(self, *, to: type[_T] | None = None) -> R | _T: cast_to=cast_to, response=self.http_response, client=cast(Any, self._client), + options=self._options, ), ) diff --git a/src/onebusaway/_streaming.py b/src/onebusaway/_streaming.py index 288db03..6a64d81 100644 --- a/src/onebusaway/_streaming.py +++ b/src/onebusaway/_streaming.py @@ -4,7 +4,7 @@ import json import inspect from types import TracebackType -from typing import TYPE_CHECKING, Any, Generic, TypeVar, Iterator, AsyncIterator, cast +from typing import TYPE_CHECKING, Any, Generic, TypeVar, Iterator, Optional, AsyncIterator, cast from typing_extensions import Self, Protocol, TypeGuard, override, get_origin, runtime_checkable import httpx @@ -13,6 +13,7 @@ if TYPE_CHECKING: from ._client import OnebusawaySDK, AsyncOnebusawaySDK + from ._models import FinalRequestOptions _T = TypeVar("_T") @@ -22,7 +23,7 @@ class Stream(Generic[_T]): """Provides the core interface to iterate over a synchronous stream response.""" response: httpx.Response - + _options: Optional[FinalRequestOptions] = None _decoder: SSEBytesDecoder def __init__( @@ -31,10 +32,12 @@ def __init__( cast_to: type[_T], response: httpx.Response, client: OnebusawaySDK, + options: Optional[FinalRequestOptions] = None, ) -> None: self.response = response self._cast_to = cast_to self._client = client + self._options = options self._decoder = client._make_sse_decoder() self._iterator = self.__stream__() @@ -85,7 +88,7 @@ class AsyncStream(Generic[_T]): """Provides the core interface to iterate over an asynchronous stream response.""" response: httpx.Response - + _options: Optional[FinalRequestOptions] = None _decoder: SSEDecoder | SSEBytesDecoder def __init__( @@ -94,10 +97,12 @@ def __init__( cast_to: type[_T], response: httpx.Response, client: AsyncOnebusawaySDK, + options: Optional[FinalRequestOptions] = None, ) -> None: self.response = response self._cast_to = cast_to self._client = client + self._options = options self._decoder = client._make_sse_decoder() self._iterator = self.__stream__() From 8d549cc7fd49514167e74d5c7f6889e7681223bd Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 24 Feb 2026 08:08:05 +0000 Subject: [PATCH 2/3] chore(internal): make `test_proxy_environment_variables` more resilient --- tests/test_client.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tests/test_client.py b/tests/test_client.py index ecd3352..fafc02b 100644 --- a/tests/test_client.py +++ b/tests/test_client.py @@ -953,6 +953,8 @@ def retry_handler(_request: httpx.Request) -> httpx.Response: def test_proxy_environment_variables(self, monkeypatch: pytest.MonkeyPatch) -> None: # Test that the proxy environment variables are set correctly monkeypatch.setenv("HTTPS_PROXY", "https://example.org") + # Delete in case our environment has this set + monkeypatch.delenv("HTTP_PROXY", raising=False) client = DefaultHttpxClient() @@ -1856,6 +1858,8 @@ async def test_get_platform(self) -> None: async def test_proxy_environment_variables(self, monkeypatch: pytest.MonkeyPatch) -> None: # Test that the proxy environment variables are set correctly monkeypatch.setenv("HTTPS_PROXY", "https://example.org") + # Delete in case our environment has this set + monkeypatch.delenv("HTTP_PROXY", raising=False) client = DefaultAsyncHttpxClient() From 2326c9e73e900efb2bee71b840f5278ff19ff67b Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 24 Feb 2026 08:08:24 +0000 Subject: [PATCH 3/3] release: 1.19.4 --- .release-please-manifest.json | 2 +- CHANGELOG.md | 9 +++++++++ pyproject.toml | 2 +- src/onebusaway/_version.py | 2 +- 4 files changed, 12 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index f257435..545be23 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "1.19.3" + ".": "1.19.4" } \ No newline at end of file diff --git a/CHANGELOG.md b/CHANGELOG.md index 90c2f99..5f3249c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,14 @@ # Changelog +## 1.19.4 (2026-02-24) + +Full Changelog: [v1.19.3...v1.19.4](https://github.com/OneBusAway/python-sdk/compare/v1.19.3...v1.19.4) + +### Chores + +* **internal:** add request options to SSE classes ([82eb18f](https://github.com/OneBusAway/python-sdk/commit/82eb18f84a795101b3d593a4d0ca0ffe8c2f61ad)) +* **internal:** make `test_proxy_environment_variables` more resilient ([8d549cc](https://github.com/OneBusAway/python-sdk/commit/8d549cc7fd49514167e74d5c7f6889e7681223bd)) + ## 1.19.3 (2026-02-20) Full Changelog: [v1.19.2...v1.19.3](https://github.com/OneBusAway/python-sdk/compare/v1.19.2...v1.19.3) diff --git a/pyproject.toml b/pyproject.toml index dcb2c96..1761896 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "onebusaway" -version = "1.19.3" +version = "1.19.4" description = "The official Python library for the onebusaway-sdk API" dynamic = ["readme"] license = "Apache-2.0" diff --git a/src/onebusaway/_version.py b/src/onebusaway/_version.py index 3597c9e..822ea3d 100644 --- a/src/onebusaway/_version.py +++ b/src/onebusaway/_version.py @@ -1,4 +1,4 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. __title__ = "onebusaway" -__version__ = "1.19.3" # x-release-please-version +__version__ = "1.19.4" # x-release-please-version