From 83e6c1b211a9eb03243e4b4c518c5fe5dbe9ddde Mon Sep 17 00:00:00 2001 From: Gabriel Selzer Date: Wed, 8 Apr 2026 17:00:37 -0500 Subject: [PATCH 1/2] Avoid jupyter-rfb 1.0.2 It switches to anywidget, which is great, except for a couple of bugs that break usage. See https://github.com/vispy/jupyter_rfb/pull/148 and also kinda https://github.com/vispy/jupyter_rfb/issues/151. Once both of those are resolved (currently only the first is) we should just enforce a new minimum bound >1.0.2. And then we may want to consider renaming the jupyter backend, because anywidget might be better. --- pyproject.toml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 3b09b37f..be9f6251 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -38,7 +38,8 @@ dependencies = ["cmap>=0.5", "numpy>=1.24", "psygnal>=0.11.1", "pydantic>=2.10", jupyter = [ "ipywidgets >=8.0.5", "jupyter >=1.1", - "jupyter_rfb >=0.3.3", + # TODO: Enforce a minimum bound once >1.0.2 released + "jupyter_rfb >=0.3.3, <= 0.5.4", # Note that this dep is only needed for Vispy, something like simplejpeg would work fine if just pygfx. "glfw", # Otherwise jupyter_rfb will use PNG, which is apparently slower From c341216c2048397a840859a0c2a4d1788472b5e1 Mon Sep 17 00:00:00 2001 From: Gabriel Selzer Date: Thu, 9 Apr 2026 09:24:04 -0500 Subject: [PATCH 2/2] Linting fixes --- pyproject.toml | 2 +- src/scenex/model/_nodes/node.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index be9f6251..0bbf7dbe 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -166,7 +166,7 @@ module = ["rendercanvas.*"] follow_untyped_imports = true [[tool.mypy.overrides]] -module = ["pygfx.*", "vispy.*", "wgpu.*", "glfw.*", "pylinalg.*", "qtpy.*", "ipywidgets.*", "IPython.*", "jupyter", "jupyter_rfb.*", "wx.*", "pytestqt.*"] +module = ["pygfx.*", "vispy.*", "wgpu.*", "pylinalg.*", "qtpy.*", "ipywidgets.*", "IPython.*", "jupyter", "jupyter_rfb.*", "wx.*", "pytestqt.*"] ignore_missing_imports = true [tool.pydantic-mypy] diff --git a/src/scenex/model/_nodes/node.py b/src/scenex/model/_nodes/node.py index de683aa1..ce43e282 100644 --- a/src/scenex/model/_nodes/node.py +++ b/src/scenex/model/_nodes/node.py @@ -275,7 +275,7 @@ def _update_parent_children(node: Node, old_parent: Node | None = None) -> None: new_parent._children.append(cast("AnyNode", node)) new_parent.child_added.emit(node) if old_parent is not None and node in old_parent._children: - old_parent._children.remove(cast("AnyNode", node)) + old_parent._children.remove(node) old_parent.child_removed.emit(node) @model_serializer(mode="wrap")