Revert "fix(messages): drop stream_timeout once native folds it into timeout so streams stay on Rust"

This reverts commit 487242006a.
This commit is contained in:
mateo 2026-10-21 09:01:37 +00:00
parent 487242006a
commit 976f7ca280
2 changed files with 2 additions and 5 deletions

View file

@ -58,7 +58,7 @@ def _native_kwargs(fields: Mapping[str, object], kwargs: Mapping[str, object]) -
stream_timeout: Final = kwargs.get("stream_timeout")
if fields.get("stream") is not True or stream_timeout is None:
return kwargs
return {**{key: value for key, value in kwargs.items() if key != "stream_timeout"}, "timeout": stream_timeout}
return {**kwargs, "timeout": stream_timeout}
def _public_request(

View file

@ -189,10 +189,7 @@ def test_native_streams_are_bounded_by_stream_timeout(stream: bool, expected_tim
python=python,
binding=messages_binding(native),
native=lambda hook, request, call_args, call_kwargs: hook(request),
rules=(
RouteRule(Route.MESSAGES, Rollout.PYTHON_ONLY, features=MESSAGES_PYTHON_FEATURES),
RouteRule(Route.MESSAGES, Rollout.RUST_REQUIRED),
),
rules=RUST_RULES,
)
assert captured[0].resolved["timeout"] == expected_timeout