Skip to content

chore: remove pyodide-http, bump to 0.27.5 #4425

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion frontend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@
"partysocket": "1.1.3",
"path-to-regexp": "^8.2.0",
"plotly.js": "^2.35.3",
"pyodide": "0.27.4",
"pyodide": "0.27.5",
"react-arborist": "^3.4.3",
"react-aria-components": "^1.7.1",
"react-codemirror-merge": "^4.23.10",
Expand Down
10 changes: 5 additions & 5 deletions frontend/pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 1 addition & 4 deletions frontend/src/core/wasm/worker/bootstrap.ts
Original file line number Diff line number Diff line change
Expand Up @@ -175,17 +175,14 @@ export class DefaultWasmController implements WasmController {
}
}

// Add:
// 1. additional dependencies of marimo that are lazily loaded.
// 2. pyodide-http, a patch to make basic http requests work in pyodide
// Add additional dependencies of marimo that are lazily loaded.
//
// These packages are included with Pyodide, which is why we don't add them
// to `foundPackages`:
// https://pyodide.org/en/stable/usage/packages-in-pyodide.html
code = `import docutils\n${code}`;
code = `import pygments\n${code}`;
code = `import jedi\n${code}`;
code = `import pyodide_http\n${code}`;

const imports = [...foundPackages];

Expand Down
3 changes: 0 additions & 3 deletions marimo/_pyodide/pyodide_session.py
Original file line number Diff line number Diff line change
Expand Up @@ -332,9 +332,6 @@ def _launch_pyodide_kernel(

LOGGER.debug("Launching kernel")

# Patches for pyodide compatibility
patches.patch_pyodide_networking()

# Some libraries mess with Python's default recursion limit, which becomes
# a problem when running with Pyodide.
patches.patch_recursion_limit(limit=1000)
Expand Down
6 changes: 0 additions & 6 deletions marimo/_runtime/patches.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,12 +45,6 @@ def patch_sys_module(module: types.ModuleType) -> None:
sys.modules[module.__name__] = module


def patch_pyodide_networking() -> None:
import pyodide_http # type: ignore

pyodide_http.patch_urllib()


def patch_recursion_limit(limit: int) -> None:
"""Set the recursion limit."""

Expand Down
Loading