JupyterLite: unpin the Pyodide kernel (Safari 27 has JSPI), add the unsuitable-browser message, adopt spatialmath-python 1.1.19
Maintainer antworten meist innerhalb von 1 Tag
@petercorke arbeitet bereits daran.
Seit 16.11.2026.
Bewertung
Dieses Issue wurde noch nicht bewertet.
Beschreibung
bdsim fixed this in https://github.com/petercorke/bdsim/pull/259 (merged 2026-11-16). The three toolboxes should converge on one JupyterLite and CI setup, so this lays out what bdsim found, what it changed, and what is left to do here. See also the notebook smoke-test timeout in https://github.com/petercorke/bdsim/issues/262 if this repo runs notebooks in one pytest test with --timeout.
What broke
After 1.5.0, the bdsim notebooks failed in Safari 27.2: a notebook hung at sim.run, import control failed, and the kernel indicator just spun. Chrome and Firefox were fine. The cause was the pin jupyterlite-pyodide-kernel==0.6.1 (Pyodide 0.27.6). We pinned it because Safari had no WebAssembly JSPI and newer Pyodide needs it. Safari 27 has JSPI (typeof WebAssembly.Suspending is "function"), and the old Pyodide now hangs on it. A kernel 0.8.7 build ran fine on the same Safari 27.2 (normal and private windows), and the old deployed site hung in a private window, so it is the pin and not stale browser state.
Browsers with JSPI: Chrome and Edge, Firefox 153 or later (enabled by default in 153, Firefox 159 tested), Waterfox 6.7.x (it moved to Gecko ESR 153), and Safari 27 or later. Without it: Safari 26 and earlier, Firefox before 153, Waterfox 6.6. So the comment in the workflow, "Safari has none as of 2026-08; Firefox only behind a flag", is now wrong, and so is "revisit this pin across RTB/MVTB/bdsim together" (it is time).
The browser check
A browser without JSPI does not fail with a message: the kernel hangs or never starts and the page shows a spinner. bdsim now adds a script to each built JupyterLite page that shows a banner when WebAssembly.Suspending is missing, naming the browsers that work. It runs on the page, before the kernel, so it works even if the kernel cannot start. Tested on Safari 26, where the banner appears.
docs/lite/jspi-check.jsis the banner script.docs/lite/inject_jspi_check.pyadds it to each built page (lab,notebooks,tree,repl,consoles,edit) and fails the build if it finds no pages.- one CI step in
docs.yml, afterjupyter lite build, andtests/test_lite_jspi_check.py.
A kernel that crashes at startup never reaches a notebook cell, so a check in the shared bootstrap cell alone would not be enough. The page-level check is the primary one.
spatialmath-python 1.1.19
bdsim now requires spatialmath-python>=1.1.19. What it changes for the toolboxes:
pre-commitis no longer a runtime dependency (rai-opensource/spatialmath-python#250). That was the reason forJL_NO_DEPSand thedeps=Falseinstall in the JupyterLite bootstrap.- It includes
spatialmath.base.environment()andisnotebook(), which know Colab and JupyterLite (#271), so each toolbox can drop its own copy of that check.
For RTB
.github/workflows/docs.ymlpinsjupyterlite-pyodide-kernel==0.6.1, andpyproject.tomlhasspatialmath-python>=1.1.18. Bump that to>=1.1.19, which closes the cause of #742 and may leave #579 and thedeps=Falseworkaround redundant (check).- RTB is different from bdsim and MVTB here: it has a compiled extension. The workflow fetches a
cp312wasm wheel to match Pyodide 0.27.6, so the pin also holds the ABI. Kernel 0.8.7 bundles Pyodide314.0.6(PYODIDE_VERSIONinjupyterlite_pyodide_kernel/constants.py). The new numbering appears to encode Python 3.14, which I have not verified. If so thecp312wheel will not load, and the wasm wheel has to be rebuilt for the new ABI, or the pure-Python fallback (#627) used. This is the real work for RTB, and it decides whether to unpin to the latest kernel or to an intermediate one. - #631 (a dual-build dispatcher for JSPI-capable and legacy browsers) may no longer be needed: with Safari 27 and Firefox 153 the remaining legacy browsers are old, and the banner tells them so. Decide whether to close it.
- Add the browser check. The existing "Check JupyterLite in a real browser" step can run a notebook against the new kernel before this deploys.
- Replace the local
sys.platform == "emscripten"check withspatialmath.base.isnotebook()if one is still there.
Convergence
Suggested: put the kernel pin policy (a floor, >=0.8.7, with a comment saying why), jspi-check.js, inject_jspi_check.py and the CI step in rvc-ecosystem, synced into each repo the way the notebook bootstrap cell is, so the three do not drift. bdsim has the working copy to start from.
- Vorherrschende Sprache
- C++
- Sterne
- 3.6k
- Forks
- 652
- Ø Merge
- 1 T. 23 Std.
- Gemergte PRs (30 T.)
- 92
Entwicklungsumgebung
- Kein Dockerfile und keine Docker-Compose-Datei
- Hat eine Pull-Request-Vorlage
- Beitragsleitfaden lesen
Erste Schritte
- Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
- Forken Sie das Repository und arbeiten Sie in einem Branch.
- Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.
Mehr aus petercorke/robotics-toolbox-python
-
bug
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 76/100
petercorke/robotics-toolbox-python#943 · 1 Kommentar ·
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 68/100
petercorke/robotics-toolbox-python#709 ·
Maintainer antworten meist innerhalb von 1 Tag
-
Integer control callbacks lose fractional vehicle limits and stop motionEvtl. vergeben @Elon-Jiang hat das heute übernommen. Offen
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 20/100
petercorke/robotics-toolbox-python#936 · 1 Kommentar · 1 zugewiesene Person ·
Maintainer antworten meist innerhalb von 1 Tag
-
Isaac Sim backendOffenenhancement
Schwierigkeit 5/5 Über eine Woche Anfängerfreundlichkeit 25/100
petercorke/robotics-toolbox-python#903 · 3 Kommentare · 1 Reaktion ·
Maintainer antworten meist innerhalb von 1 Tag
-
Backend registry: single name → constructor dispatchEvtl. vergeben @petercorke hat das vor 22 Tagen übernommen. Offenenhancement
petercorke/robotics-toolbox-python#902 · 3 Kommentare · 1 zugewiesene Person ·
Maintainer antworten meist innerhalb von 1 Tag
Alle Issues in petercorke/robotics-toolbox-python
Ähnliche Issues
-
Needs: Author Feedback Needs: Repro
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 82/100
react/react-native#60059 · 1 Kommentar ·
Maintainer antworten meist innerhalb von 2 Tagen
-
area:build bug
Schwierigkeit 1/5 Unter einer Stunde Anfängerfreundlichkeit 90/100
NatronGitHub/openfx-arena#71 ·
Maintainer antworten meist innerhalb von 1 Tag
-
upstream-blocked
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 65/100
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 72/100
ROCm/FastFlowLM#1057 ·
Maintainer antworten meist innerhalb von 1 Tag
-
bug
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 76/100
NatronGitHub/openfx-gmic#45 ·
Maintainer antworten meist innerhalb von 1 Tag