Skip to content

Commit a21f6ae

Browse files
authored
Avoid jupyter-rfb 1.0.2 (#63)
* Avoid jupyter-rfb 1.0.2 It switches to anywidget, which is great, except for a couple of bugs that break usage. See vispy/jupyter_rfb#148 and also kinda vispy/jupyter_rfb#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. * Linting fixes
1 parent f5ad9ed commit a21f6ae

2 files changed

Lines changed: 4 additions & 3 deletions

File tree

pyproject.toml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,8 @@ dependencies = ["cmap>=0.5", "numpy>=1.24", "psygnal>=0.11.1", "pydantic>=2.10",
3838
jupyter = [
3939
"ipywidgets >=8.0.5",
4040
"jupyter >=1.1",
41-
"jupyter_rfb >=0.3.3",
41+
# TODO: Enforce a minimum bound once >1.0.2 released
42+
"jupyter_rfb >=0.3.3, <= 0.5.4",
4243
# Note that this dep is only needed for Vispy, something like simplejpeg would work fine if just pygfx.
4344
"glfw",
4445
# Otherwise jupyter_rfb will use PNG, which is apparently slower
@@ -165,7 +166,7 @@ module = ["rendercanvas.*"]
165166
follow_untyped_imports = true
166167

167168
[[tool.mypy.overrides]]
168-
module = ["pygfx.*", "vispy.*", "wgpu.*", "glfw.*", "pylinalg.*", "qtpy.*", "ipywidgets.*", "IPython.*", "jupyter", "jupyter_rfb.*", "wx.*", "pytestqt.*"]
169+
module = ["pygfx.*", "vispy.*", "wgpu.*", "pylinalg.*", "qtpy.*", "ipywidgets.*", "IPython.*", "jupyter", "jupyter_rfb.*", "wx.*", "pytestqt.*"]
169170
ignore_missing_imports = true
170171

171172
[tool.pydantic-mypy]

src/scenex/model/_nodes/node.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -275,7 +275,7 @@ def _update_parent_children(node: Node, old_parent: Node | None = None) -> None:
275275
new_parent._children.append(cast("AnyNode", node))
276276
new_parent.child_added.emit(node)
277277
if old_parent is not None and node in old_parent._children:
278-
old_parent._children.remove(cast("AnyNode", node))
278+
old_parent._children.remove(node)
279279
old_parent.child_removed.emit(node)
280280

281281
@model_serializer(mode="wrap")

0 commit comments

Comments
 (0)