feat: standardize timeout values to floats in seconds (#1766)

This commit is contained in:
Yugan 2025-12-19 17:52:56 +05:30 • committed by GitHub
commit 2aa1ad2a69
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -100,8 +100,8 @@ class StreamableHTTPTransport:
self,
url: str,
headers: dict[str, str] | None = None,
timeout: float | timedelta = 30,
sse_read_timeout: float | timedelta = 60 * 5,
timeout: float = 30.0,
sse_read_timeout: float = 300.0,
auth: httpx.Auth | None = None,
) -> None: ...
@ -118,8 +118,8 @@ class StreamableHTTPTransport:
Args:
url: The endpoint URL.
headers: Optional headers to include in requests.
timeout: HTTP timeout for regular operations.
sse_read_timeout: Timeout for SSE read operations.
timeout: HTTP timeout for regular operations (in seconds).
sse_read_timeout: Timeout for SSE read operations (in seconds).
auth: Optional HTTPX authentication handler.
"""
# Check for deprecated parameters and issue runtime warning