Jump to solution
Details

The Fix

pip install urllib3==2.2.0

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

Open PR/Commit
@@ -0,0 +1,7 @@ @@ -0,0 +1,7 @@ +env: + es2020 : true + worker: true
fix.md
Option A — Upgrade to fixed release\npip install urllib3==2.2.0\nWhen NOT to use: This fix is not suitable for environments without cross-origin isolation or where streaming is not required.\n\n

Why This Fix Works in Production

  • Trigger: Synchronous HTTP requests failed in Pyodide/PyScript environments, causing application errors.
  • Mechanism: This PR adds native support for Emscripten in urllib3, enabling streaming HTTP requests in cross-origin isolated browser environments
  • Why the fix works: Adds native support for Emscripten in urllib3, enabling streaming HTTP requests in cross-origin isolated browser environments. (first fixed release: 2.2.0).

Why This Breaks in Prod

  • This PR adds native support for Emscripten in urllib3, enabling streaming HTTP requests in cross-origin isolated browser environments
  • Production symptom (often without a traceback): Synchronous HTTP requests failed in Pyodide/PyScript environments, causing application errors.

Proof / Evidence

  • GitHub issue: #2951
  • Fix PR: https://github.com/urllib3/urllib3/pull/3195
  • First fixed release: 2.2.0
  • 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.90

Discussion

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

“Created this project on pyscript.com which shows the current state of affairs: https://b15ad9a9-0744-48ba-8e37-eedddba9292c.pyscriptapps.com/7b5d346e-e490-43f0-b43f-cdeae7f24665/latest/”
@sethmlarson · 2023-03-29 · source
“This is awesome! This means I can add an urllib3 version check in pyodide-http and skip the patching, right?”
@koenvo · 2023-11-26 · source
“@koenvo - yes. I'm gonna put a PR into pyodide to include requests and urllib3 as a core package when I have the time.”
@joemarshall · 2023-11-29 · source
“@joemarshall Thanks for doing that! Could you include me on those PRs if only just to see what is happening over there? :)”
@sethmlarson · 2023-12-01 · source

Failure Signature (Search String)

  • Synchronous HTTP requests failed in Pyodide/PyScript environments, causing application errors.
Copy-friendly signature
signature.txt
Failure Signature ----------------- Synchronous HTTP requests failed in Pyodide/PyScript environments, causing application errors.

Error Message

Signature-only (no traceback captured)
error.txt
Error Message ------------- Synchronous HTTP requests failed in Pyodide/PyScript environments, causing application errors.

What Broke

Synchronous HTTP requests failed in Pyodide/PyScript environments, causing application errors.

Why It Broke

This PR adds native support for Emscripten in urllib3, enabling streaming HTTP requests in cross-origin isolated browser environments

Fix Options (Details)

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

pip install urllib3==2.2.0

When NOT to use: This fix is not suitable for environments without cross-origin isolation or where streaming is not required.

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

First fixed release: 2.2.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

  • This fix is not suitable for environments without cross-origin isolation or where streaming is not required.

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
2.2.0 Fixed

Related Issues

No related fixes found.

Sources

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