Jump to solution
Verify

The Fix

Upgrade to version 0.13.0 or later.

Based on closed encode/httpx issue #435 · 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%.

Jump to Verify Open PR/Commit
@@ -250,83 +250,78 @@ async with httpx.Client(proxies=proxy) as client: information at `Client` initialization. -## Timeout fine-tuning +## Timeout Configuration
repro.py
>> import httpx >> httpx.config.DEFAULT_TIMEOUT_CONFIG TimeoutConfig(timeout=5.0) >> httpx.TimeoutConfig(read_timeout=1) # We'd expect connect_timeout and write_timeout to be 5 (the default) TimeoutConfig(connect_timeout=None, read_timeout=1, write_timeout=None)
verify
Re-run the minimal reproduction on your broken version, then apply the fix and re-run.
fix.md
Option A — Upgrade to fixed release\nUpgrade to version 0.13.0 or later.\nWhen NOT to use: This fix is not suitable if you require completely custom timeout behavior without defaults.\n\n

Why This Fix Works in Production

  • Trigger: Fine-tuning timeouts from the default timeout config
  • Mechanism: TimeoutConfig did not use default values for unspecified timeouts
  • Why the fix works: Allows users to create a TimeoutConfig with default values for unspecified timeouts, addressing issue #435. (first fixed release: 0.13.0).
Production impact:
  • 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

  • TimeoutConfig did not use default values for unspecified timeouts
  • Production symptom (often without a traceback): Fine-tuning timeouts from the default timeout config

Proof / Evidence

  • GitHub issue: #435
  • Fix PR: https://github.com/encode/httpx/pull/593
  • First fixed release: 0.13.0
  • 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.65

Discussion

High-signal excerpts from the issue thread (symptoms, repros, edge-cases).

“And so we'd have: This looks like a nice approach to me. I suppose we'd get rid of DEFAULT_TIMEOUT_CONFIG entirely and use TimeoutConfig() instead?”
@florimondmanca · 2019-10-04 · source
“What about making TimeoutConfig(read_timeout=1) result in 5, 1, 5 instead of None, 1, None? Then you have to be explicit about the other two if…”
@sethmlarson · 2019-10-03 · source
“Simplest question is, what do we want this to return?... I *think* we should probably switch things around so that it'll give you TimeoutConfig(timeout=5) rather…”
@lovelydinosaur · 2019-10-04 · source

Failure Signature (Search String)

  • Fine-tuning timeouts from the default timeout config
  • Currently, if we want to change only one of the three timeouts (connect, read, write) we need to build a full-blown `TimeoutConfig`. But there is no way to use the default timeout
Copy-friendly signature
signature.txt
Failure Signature ----------------- Fine-tuning timeouts from the default timeout config Currently, if we want to change only one of the three timeouts (connect, read, write) we need to build a full-blown `TimeoutConfig`. But there is no way to use the default timeout values.

Error Message

Signature-only (no traceback captured)
error.txt
Error Message ------------- Fine-tuning timeouts from the default timeout config Currently, if we want to change only one of the three timeouts (connect, read, write) we need to build a full-blown `TimeoutConfig`. But there is no way to use the default timeout values.

Minimal Reproduction

repro.py
>> import httpx >> httpx.config.DEFAULT_TIMEOUT_CONFIG TimeoutConfig(timeout=5.0) >> httpx.TimeoutConfig(read_timeout=1) # We'd expect connect_timeout and write_timeout to be 5 (the default) TimeoutConfig(connect_timeout=None, read_timeout=1, write_timeout=None)

What Broke

Users faced issues when trying to set individual timeouts without default values.

Why It Broke

TimeoutConfig did not use default values for unspecified timeouts

Fix Options (Details)

Option A — Upgrade to fixed release Safe default (recommended)

Upgrade to version 0.13.0 or later.

When NOT to use: This fix is not suitable if you require completely custom timeout behavior without defaults.

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/593

First fixed release: 0.13.0

Last verified: 2026-02-09. Validate in your environment.

Get updates

We publish verified fixes weekly. No spam.

Subscribe

When NOT to Use This Fix

  • This fix is not suitable if you require completely custom timeout behavior without defaults.

Verify Fix

verify
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

VersionStatus
0.13.0 Fixed

Related Issues

No related fixes found.

Sources

We don’t republish the full GitHub discussion text. Use the links above for context.