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%.
@@ -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.
# 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)
Re-run the minimal reproduction on your broken version, then apply the fix and re-run.
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).
- 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.”
“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…”
“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.”
“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…”
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
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 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
# 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
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.
When NOT to Use This Fix
- Do not use if it changes public behavior or if the failure cannot be reproduced.
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.
Version Compatibility Table
| Version | Status |
|---|---|
| 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.