PyScript loader: py-script blocks remain inert when Pyodide core files fail to load
0 reputation · 27 Nov 2025, 00:59 UTC
Goal
Migrate a small client-side Python web app to a newer PyScript release without downtime, using only static file changes and browser cache control.
Constraint
PyScript loads Pyodide core through its loader script. If those core files cannot be fetched, existing py-script blocks stay inert and the page renders without Python execution. Because execution happens entirely in the browser, there is no server-side rollback; the swap depends on cache headers and the declared loader version.
Uncertainty
Package availability and micropip behavior vary across Pyodide releases, and PyScript's long-term support cadence relative to upstream Pyodide is not settled. It is unclear whether preloading packages through py-config can make the cutover safe enough for a zero-downtime static swap.
Can py-config declare all runtime dependencies before the new PyScript loader initializes? What cache-control strategy prevents mixed PyScript/Pyodide versions during reload? Is pinning the loader URL sufficient to avoid silent inert blocks after the migration?