Uh oh!
There was an error while loading. Please reload this page.
feat: Unify the request pipeline across HTTP clients - #1022
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@## master #1022 +/- ##
==========================================
+ Coverage 94.90% 94.96% +0.05%
==========================================
Files 58 58 Lines 5418 5438 +20 ==========================================
+ Hits 5142 5164 +22 + Misses 276 274 -2
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Pijukatel
left a comment
There was a problem hiding this comment.
I see your PR attracted some of my comments to pre-existing code. Well, that is what you get for moving the code around :-D
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
…pipeline # Conflicts: # tests/unit/test_client_errors.py
Uh oh!
There was an error while loading. Please reload this page.
Moves
call, the retry loop, and the per-attempt request handling fromImpitHttpClientandImpitHttpClientAsyncintoHttpClientandHttpClientAsync, leaving Impit as a thin adapter over the transport hooks:send_request,is_retryable_transport_error,is_timeout_error, andclose()/aclose()plus context managers. A custom client that overridescallkeeps working unchanged and opts out of the shared pipeline.StreamedLogclassifies timeouts through the transport-neutralis_timeout_errorhook instead of importing Impit.No behavior change for the built-in clients: the retry policy shipped in #1019 (permanent transport errors fail fast) and #1020 (a failed read of a streamed error body is classified like a failed send and the response is closed) is preserved — the classification now lives in the
is_retryable_transport_errorhook, and the error-body read handling in the shared pipeline.Supersedes #1011, rebased onto current master and squashed. Originally split out of #1006.
Stack: #1022 (this) → #1004 (HTTPX client) → #1013 (docs).
✍️ Drafted by Claude Code