fix(client): retry unmapped TLS transport errors (#3982)
Raw TLS failures can escape HTTPX2's exception normalization and bypass the SDK's retry and connection-error handling introduced in 3.14.1. Treat `ssl.SSLError` and `anyio.EndOfStream` as connection errors until the upstream mappings are fixed, with a short comment linking pydantic/httpx2#854. Request failures now honor the retry budget and raise `APIConnectionError` on exhaustion. Streaming failures are wrapped without replaying the stream. Generic application exceptions still propagate unchanged. Closes #3969. Validation: - Client, streaming, and HTTPX2 suites: 368 passed, 22 skipped. - Regression coverage includes sync/async recovery, exhaustion, disabled retries, and failures before/after the first streaming event. - Ruff, targeted mypy, and `git diff --check` passed. - Tests used frozen dependencies because `uv run --locked` reported an existing lockfile mismatch; proxy environment variables were unset for the offline tests. - Pyright could not run because the repository requires Node 22.22.3 and the active Node is 18.19.1.
M
Marcus Wood committed
0d35a2640458b64ed2ff4a7c9b1f1a1e5705336e
Parent: a380cf2
Committed by GitHub <noreply@github.com>
on 9/28/2026, 3:48:38 PM