The Fix
pip install urllib3==1.26.7
Based on closed urllib3/urllib3 issue #2373 · 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%.
@@ -0,0 +1,9 @@
@@ -0,0 +1,9 @@
+Added ``ssl_minimum_version`` and ``ssl_maximum_version`` options which set
+``SSLContext.minimum_version`` and ``SSLContext.maximum_version``.
+
Option A — Upgrade to fixed release\npip install urllib3==1.26.7\nWhen NOT to use: This fix should not be used if the application requires support for TLSv1 or TLSv1.1.\n\n
Why This Fix Works in Production
- Trigger: Set SSLContext.minimum_version to TLSv1.2 by default
- Mechanism: Sets the default minimum SSL/TLS version to TLSv1.2 in urllib3, aligning it with Python 3.10 standards.
- Why the fix works: Sets the default minimum SSL/TLS version to TLSv1.2 in urllib3, aligning it with Python 3.10 standards. (first fixed release: 1.26.7).
- 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.2 breaks; 1.26.7 is the first fixed release.
- Shows up under Python 3.10 in real deployments (not just unit tests).
- Production symptom (often without a traceback): Set SSLContext.minimum_version to TLSv1.2 by default
Proof / Evidence
- GitHub issue: #2373
- Fix PR: https://github.com/urllib3/urllib3/pull/2220
- First fixed release: 1.26.7
- Affected versions: 1.2
- 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.78
Discussion
High-signal excerpts from the issue thread (symptoms, repros, edge-cases).
“Starting in https://github.com/urllib3/urllib3/pull/2002 we deprecated negotiating TLSv1 and TLSv1.1 with the default TLS configuration. Users would have to opt-in to earlier TLS versions to not encounter a DeprecationWarning. Now in 2.0 we”
Failure Signature (Search String)
- Set SSLContext.minimum_version to TLSv1.2 by default
- This has also been done to Python 3.10 with `ssl.create_ssl_context()` so this will bring urllib3 in line with Python.
Copy-friendly signature
Failure Signature
-----------------
Set SSLContext.minimum_version to TLSv1.2 by default
This has also been done to Python 3.10 with `ssl.create_ssl_context()` so this will bring urllib3 in line with Python.
Error Message
Signature-only (no traceback captured)
Error Message
-------------
Set SSLContext.minimum_version to TLSv1.2 by default
This has also been done to Python 3.10 with `ssl.create_ssl_context()` so this will bring urllib3 in line with Python.
Environment
- Python: 3.10
Fix Options (Details)
Option A — Upgrade to fixed release Safe default (recommended)
pip install urllib3==1.26.7
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/2220
First fixed release: 1.26.7
Last verified: 2026-02-09. Validate in your environment.
When NOT to Use This Fix
- This fix should not be used if the application requires support for TLSv1 or TLSv1.1.
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
| Version | Status |
|---|---|
| 1.2 | Broken |
| 1.26.7 | Fixed |
Related Issues
No related fixes found.
Sources
We don’t republish the full GitHub discussion text. Use the links above for context.