Jump to solution
Details

The Fix

pip install urllib3==2.0.0a4

Based on closed urllib3/urllib3 issue #2941 · PR/commit linked

Production note: Watch p95/p99 latency and retry volume; timeouts can turn into retry storms and duplicate side-effects.

Open PR/Commit
@@ -354,6 +354,15 @@ def test_decode_zstd_error(self, data: bytes) -> None: HTTPResponse(fp, headers={"content-encoding": "zstd"}) + @onlyZstd() + @pytest.mark.parametrize("data", [b"foo", b"x" * 100]) + def test_decode_zstd_incomplete(self, data: bytes) -> None:
fix.md
Option A — Upgrade to fixed release\npip install urllib3==2.0.0a4\nWhen NOT to use: Do not use if it changes public behavior or if the failure cannot be reproduced.\n\n

Why This Fix Works in Production

  • Trigger: Investigate zstandard DecodeError coverage issue
  • Mechanism: Fixed a coverage regression related to DecodeError in ZstdDecoder when zstandard 0.20 is installed.
  • Why the fix works: Fixed a coverage regression related to DecodeError in ZstdDecoder when zstandard 0.20 is installed. (first fixed release: 2.0.0a4).
Production impact:
  • If left unfixed, this can cause silent data inconsistencies that propagate (bad cache entries, incorrect downstream decisions).

Why This Breaks in Prod

  • Surfaces as: Investigate zstandard DecodeError coverage issue

Proof / Evidence

  • GitHub issue: #2941
  • Fix PR: https://github.com/urllib3/urllib3/pull/2949
  • First fixed release: 2.0.0a4
  • 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.74

Discussion

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

“Closed in https://github.com/urllib3/urllib3/pull/2949 @Ousret you can submit a bounty claim on OpenCollective to collect the $100. Thanks again!”
@sethmlarson · 2023-03-31 · source
“Thanks @Ousret! I've approved your expense in OpenCollective for $100”
@sethmlarson · 2023-05-28 · source

Failure Signature (Search String)

  • Investigate zstandard DecodeError coverage issue

Error Message

Stack trace
error.txt
Error Message ------------- Investigate zstandard DecodeError coverage issue

What Broke

The application fails to decode zstandard compressed data, leading to potential data loss.

Fix Options (Details)

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

pip install urllib3==2.0.0a4

When NOT to use: Do not use if it changes public behavior or if the failure cannot be reproduced.

Use when you can deploy the upstream fix. It is usually lower-risk than long-lived workarounds.

Fix reference: https://github.com/urllib3/urllib3/pull/2949

First fixed release: 2.0.0a4

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

  • Do not use if it changes public behavior or if the failure cannot be reproduced.

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.
  • Add a TLS smoke test that performs a real handshake in CI (include CA bundle validation and hostname checks).
  • Alert on handshake failures by error string and endpoint to catch cert/CA changes quickly.

Version Compatibility Table

VersionStatus
2.0.0a4 Fixed

Related Issues

No related fixes found.

Sources

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