Jump to solution
Verify

The Fix

pip install urllib3==1.26.10

Based on closed urllib3/urllib3 issue #1641 · 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
@@ -295,6 +295,9 @@ def _normalize_host(host: Optional[str], scheme: Optional[str]) -> Optional[str] is_ipv6 = _IPV6_ADDRZ_RE.match(host) if is_ipv6: + # IPv6 hosts of the form 'a::b%zone' are encoded in a URL as + # such per RFC 6874: 'a::b%25zone'. Unquote the ZoneID + # separator as necessary to return a valid RFC 4007 scoped IP.
repro.py
# Previous behavior >> urllib3.util.url.get_host('http://[a::b%iface]/') ('http', '[a::b%iface]', None) >> urllib3.util.url.get_host('http://[a::b%25iface]/') ('http', '[a::b%25iface]', None) # New behavior >> urllib3.util.url.get_host('http://[a::b%iface]/') ('http', '[a::b%25iface]', None) >> urllib3.util.url.get_host('http://[a::b%25iface]/') ('http', '[a::b%25iface]', 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\npip install urllib3==1.26.10\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: Can't connect to IPv6 Address with Zone ID
  • Mechanism: Improves testing for IPv6 scoped addresses support, ensuring compliance with RFC 6874.
  • Why the fix works: Improves testing for IPv6 scoped addresses support, ensuring compliance with RFC 6874. (first fixed release: 1.26.10).
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

  • Production symptom (often without a traceback): Can't connect to IPv6 Address with Zone ID

Proof / Evidence

  • GitHub issue: #1641
  • Fix PR: https://github.com/urllib3/urllib3/pull/2629
  • First fixed release: 1.26.10
  • 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.47

Discussion

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

“I'm working on resolving this issue and another issue related to IPv6 Zone IDs.”
@sethmlarson · 2019-07-09 · source
“I think the system is working as intended: you tested the code, were surprised that it worked, tried various commits, made some research, took the…”
@pquentin · 2022-06-10 · source
“This issue has been closed in https://github.com/urllib3/urllib3/pull/2629 and and #2635. Thanks @delroth! I look forward to seeing your invoice to collect the bounty.”
@sethmlarson · 2022-06-10 · source
“Thanks @delroth for all this context and investigation! I don't think we need to change the bounty amount if you're interested in being paid for…”
@sethmlarson · 2022-06-10 · source

Failure Signature (Search String)

  • Can't connect to IPv6 Address with Zone ID
  • Requests fails on IPv6 URLs that contain a zone identifier when used with the current urllib3 (1.25).
Copy-friendly signature
signature.txt
Failure Signature ----------------- Can't connect to IPv6 Address with Zone ID Requests fails on IPv6 URLs that contain a zone identifier when used with the current urllib3 (1.25).

Error Message

Signature-only (no traceback captured)
error.txt
Error Message ------------- Can't connect to IPv6 Address with Zone ID Requests fails on IPv6 URLs that contain a zone identifier when used with the current urllib3 (1.25).

Minimal Reproduction

repro.py
# Previous behavior >> urllib3.util.url.get_host('http://[a::b%iface]/') ('http', '[a::b%iface]', None) >> urllib3.util.url.get_host('http://[a::b%25iface]/') ('http', '[a::b%25iface]', None) # New behavior >> urllib3.util.url.get_host('http://[a::b%iface]/') ('http', '[a::b%25iface]', None) >> urllib3.util.url.get_host('http://[a::b%25iface]/') ('http', '[a::b%25iface]', None)

Environment

  • urllib3: 1.25

What Broke

Requests fails on IPv6 URLs with zone identifiers, resulting in connection errors.

Fix Options (Details)

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

pip install urllib3==1.26.10

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

First fixed release: 1.26.10

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.

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.

Version Compatibility Table

VersionStatus
1.26.10 Fixed

Related Issues

No related fixes found.

Sources

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