Jump to solution
Verify

The Fix

pip install requests==2.27.0

Based on closed psf/requests issue #5555 · 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
@@ -4,9 +4,14 @@ Release History --- -**Bugfixes** +**Improvements** +
repro.py
{ "chardet": { "version": "3.0.4" }, "cryptography": { "version": "2.8" }, "idna": { "version": "2.10" }, "implementation": { "name": "CPython", "version": "3.6.10" }, "platform": { "release": "10", "system": "Windows" }, "pyOpenSSL": { "openssl_version": "1010105f", "version": "19.1.0" }, "requests": { "version": "2.24.0" }, "system_ssl": { "version": "1000214f" }, "urllib3": { "version": "1.25.9" }, "using_pyopenssl": true }
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 requests==2.27.0\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: Requests now forcing TLS 1.2 on Python 3.6.10
  • Mechanism: Modifies the behavior of pyOpenSSL usage in requests to only activate when SNI is not supported, addressing TLS version issues on Python 3.6.10.
  • Why the fix works: Modifies the behavior of pyOpenSSL usage in requests to only activate when SNI is not supported, addressing TLS version issues on Python 3.6.10. (first fixed release: 2.27.0).
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

  • Shows up under Python 3.6.10 in real deployments (not just unit tests).
  • Production symptom (often without a traceback): Requests now forcing TLS 1.2 on Python 3.6.10

Proof / Evidence

  • GitHub issue: #5555
  • Fix PR: https://github.com/psf/requests/pull/5443
  • First fixed release: 2.27.0
  • 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.55

Discussion

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

“Hey @cleebp, Thanks for bringing this up! I don't think we'd taken this into account when pushing pyopenssl to the background”
@nateprewitt · 2020-08-11 · source
“Resolving since we haven't seen any further feedback on this and it's easily resolvable by the end user.”
@nateprewitt · 2020-11-10 · source

Failure Signature (Search String)

  • Requests now forcing TLS 1.2 on Python 3.6.10
  • On Python 3.6.10 with `pyopenssl` installed requests should use the highest TLS available, 1.3 (from `pyopenssl`), not 1.2 (from `ssl`).
Copy-friendly signature
signature.txt
Failure Signature ----------------- Requests now forcing TLS 1.2 on Python 3.6.10 On Python 3.6.10 with `pyopenssl` installed requests should use the highest TLS available, 1.3 (from `pyopenssl`), not 1.2 (from `ssl`).

Error Message

Signature-only (no traceback captured)
error.txt
Error Message ------------- Requests now forcing TLS 1.2 on Python 3.6.10 On Python 3.6.10 with `pyopenssl` installed requests should use the highest TLS available, 1.3 (from `pyopenssl`), not 1.2 (from `ssl`).

Minimal Reproduction

repro.py
{ "chardet": { "version": "3.0.4" }, "cryptography": { "version": "2.8" }, "idna": { "version": "2.10" }, "implementation": { "name": "CPython", "version": "3.6.10" }, "platform": { "release": "10", "system": "Windows" }, "pyOpenSSL": { "openssl_version": "1010105f", "version": "19.1.0" }, "requests": { "version": "2.24.0" }, "system_ssl": { "version": "1000214f" }, "urllib3": { "version": "1.25.9" }, "using_pyopenssl": true }

Environment

  • Python: 3.6.10

Fix Options (Details)

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

pip install requests==2.27.0

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/psf/requests/pull/5443

First fixed release: 2.27.0

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 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.27.0 Fixed

Related Issues

No related fixes found.

Sources

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