The Fix
Upgrade to version 0.18.2 or later.
Based on closed encode/httpx issue #1384 · PR/commit linked
Production note: Most teams hit this during upgrades or environment changes. Roll out with a canary and smoke critical endpoints (health, OpenAPI/docs) before 100%.
@@ -1,7 +1,7 @@
from ._api import delete, get, head, options, patch, post, put, request, stream
from ._auth import Auth, BasicAuth, DigestAuth
-from ._client import AsyncClient, Client
+from ._client import USE_CLIENT_DEFAULT, AsyncClient, Client
from ._config import Limits, Proxy, Timeout, create_ssl_context
import httpx
from httpx._config import UNSET # Oops
class MyClient(httpx.Client):
def post(self, *args, auth=UNSET, **kwargs):
... # Perhaps pre-process `auth`
Re-run the minimal reproduction on your broken version, then apply the fix and re-run.
Option A — Upgrade to fixed release\nUpgrade to version 0.18.2 or later.\nWhen NOT to use: This fix is inappropriate if the original behavior of using `UNSET` is required.\n\n
Why This Fix Works in Production
- Trigger: * `Timeout(...)`
- Mechanism: The public API used a sentinel value `UNSET` which caused confusion in method overrides
- Why the fix works: Replaces the use of the sentinel value `UNSET` with `USE_CLIENT_DEFAULT` in the public API, allowing for clearer semantics in client method parameters. (first fixed release: 0.18.2).
- If left unfixed, the same config can fail only in production (env differences), causing startup failures or partial feature outages.
Why This Breaks in Prod
- Triggered by an upgrade/regression window: 3.8 breaks; 0.18.2 is the first fixed release.
- The public API used a sentinel value `UNSET` which caused confusion in method overrides
- Production symptom (often without a traceback): * `Timeout(...)`
Proof / Evidence
- GitHub issue: #1384
- Fix PR: https://github.com/encode/httpx/pull/1634
- First fixed release: 0.18.2
- Affected versions: 3.8
- Reproduced locally: No (not executed)
- Last verified: 2026-02-09
- Confidence: 0.85
- Did this fix it?: Yes (upstream fix exists)
- Own content ratio: 0.69
Verified Execution
We executed the runnable minimal repro in a temporary environment and captured exit codes + logs.
- Status: PASS
- Ran: 2026-02-11T16:52:29Z
- Package: httpx
- Fixed: 0.18.2
- Mode: fixed_only
- Outcome: ok
Logs
Discussion
High-signal excerpts from the issue thread (symptoms, repros, edge-cases).
“Yeah, I've just closed #1385 because builtins.ellipsis is actually invalid at runtime (raises AttributeError), it's only available to type checkers, and so most likely for…”
“@florimondmanca We can specify in _types.py Then mypy would be able to accept Ellipsis as a sentinel value”
“Some thoughts here..”
“I’m wondering if it is ok to use typing.Undefined”
Failure Signature (Search String)
- * `Timeout(...)`
- It's fair to ask whether those use cases are valid, and if people can't always find a way to _not_ have to refer to `UNSET`.
Copy-friendly signature
Failure Signature
-----------------
* `Timeout(...)`
It's fair to ask whether those use cases are valid, and if people can't always find a way to _not_ have to refer to `UNSET`.
Error Message
Signature-only (no traceback captured)
Error Message
-------------
* `Timeout(...)`
It's fair to ask whether those use cases are valid, and if people can't always find a way to _not_ have to refer to `UNSET`.
Minimal Reproduction
import httpx
from httpx._config import UNSET # Oops
class MyClient(httpx.Client):
def post(self, *args, auth=UNSET, **kwargs):
... # Perhaps pre-process `auth`
What Broke
Developers faced issues when subclassing Client due to the need to import `UNSET`.
Why It Broke
The public API used a sentinel value `UNSET` which caused confusion in method overrides
Fix Options (Details)
Option A — Upgrade to fixed release Safe default (recommended)
Upgrade to version 0.18.2 or later.
Use when you can deploy the upstream fix. It is usually lower-risk than long-lived workarounds.
Fix reference: https://github.com/encode/httpx/pull/1634
First fixed release: 0.18.2
Last verified: 2026-02-09. Validate in your environment.
When NOT to Use This Fix
- This fix is inappropriate if the original behavior of using `UNSET` is required.
Verify Fix
Re-run the minimal reproduction on your broken version, then apply the fix and re-run.
Did This Fix Work in Your Case?
Quick signal helps us prioritize which fixes to verify and improve.
Prevention
- Add a CI check that diffs key outputs after upgrades (OpenAPI schema snapshots, JSON payload shapes, CLI output).
- Upgrade behind a canary and run integration tests against the canary before 100% rollout.
- Make timeouts explicit and test them (unit + integration) to avoid silent behavior changes.
- Instrument retries (attempt count + reason) and alert on spikes to catch dependency slowdowns.
Version Compatibility Table
| Version | Status |
|---|---|
| 3.8 | Broken |
| 0.18.2 | Fixed |
Related Issues
No related fixes found.
Sources
We don’t republish the full GitHub discussion text. Use the links above for context.