Jump to solution
Details

The Fix

pip install urllib3==1.26.6

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

Production note: This usually shows up under retries/timeouts. Treat it as a side-effect risk until you can verify behavior with a canary + real traffic.

Open PR/Commit
@@ -44,7 +44,7 @@ jobs: experimental: false nox-session: test_brotlipy - - python-version: 3.10.0-alpha.7 + - python-version: 3.10.0-beta.2 os: ubuntu-latest
fix.md
Option A — Upgrade to fixed release\npip install urllib3==1.26.6\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: /usr/lib/python3.10/site-packages/urllib3/connection.py:542: DeprecationWarning: ssl.match_hostname() is deprecated
  • Mechanism: Fix warnings related to deprecated SSL features in Python 3.10.
  • Why the fix works: Fix warnings related to deprecated SSL features in Python 3.10. (first fixed release: 1.26.6).
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

  • Triggered by an upgrade/regression window: 1.1.1 breaks; 1.26.6 is the first fixed release.
  • Shows up under Python 3.10 in real deployments (not just unit tests).
  • Production symptom (often without a traceback): Python 3.10 ssl module deprecations

Proof / Evidence

  • GitHub issue: #2200
  • Fix PR: https://github.com/urllib3/urllib3/pull/2209
  • First fixed release: 1.26.6
  • Affected versions: 1.1.1
  • Reproduced locally: No (not executed)
  • Last verified: 2026-02-09
  • Confidence: 0.95
  • Did this fix it?: Yes (upstream fix exists)
  • Own content ratio: 0.73

Discussion

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

“oh, the second one is probably a deprecation warning in the app I'm running, ignore that. But the ssl.match_hostname() one is in urllib3 itself.”
@AdamWill · 2021-09-30 · source
“Right, only the ssl.match_hostname are our faults. Opened https://github.com/urllib3/urllib3/issues/2439 to fix it.”
@pquentin · 2021-10-01 · source
“I'm still seeing two deprecations with Python 3.10 rc2 and urllib3 1.26.7: /usr/lib/python3.10/site-packages/urllib3/connection.py:542: DeprecationWarning: ssl.match_hostname() is deprecated match_hostname(cert, asserted_hostname) /usr/lib/python3.10/site-pack”
@AdamWill · 2021-09-30 · source

Failure Signature (Search String)

  • /usr/lib/python3.10/site-packages/urllib3/connection.py:542: DeprecationWarning: ssl.match_hostname() is deprecated
Copy-friendly signature
signature.txt
Failure Signature ----------------- Python 3.10 ssl module deprecations /usr/lib/python3.10/site-packages/urllib3/connection.py:542: DeprecationWarning: ssl.match_hostname() is deprecated

Error Message

Signature-only (no traceback captured)
error.txt
Error Message ------------- Python 3.10 ssl module deprecations /usr/lib/python3.10/site-packages/urllib3/connection.py:542: DeprecationWarning: ssl.match_hostname() is deprecated

Environment

  • Python: 3.10
  • urllib3: 1.26.7

Fix Options (Details)

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

pip install urllib3==1.26.6

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

First fixed release: 1.26.6

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
1.1.1 Broken
1.26.6 Fixed

Related Issues

No related fixes found.

Sources

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