Skip to content

Fix jupyter events#587

Merged
almarklein merged 3 commits intopygfx:mainfrom
kushalkolar:fix-jupyter-events
Sep 17, 2024
Merged

Fix jupyter events#587
almarklein merged 3 commits intopygfx:mainfrom
kushalkolar:fix-jupyter-events

Conversation

@kushalkolar
Copy link
Copy Markdown
Contributor

It's not necessary to redefine _event_handlers in JupyterWgpuCanvas since it's already defined in WgpuAutoGui.

wgpu-py/wgpu/gui/base.py

Lines 187 to 200 in b8c6335

class WgpuAutoGui:
"""Mixin class for canvases implementing autogui.
This class provides a common API for handling events and registering
event handlers. It adds to :class:`WgpuCanvasBase <wgpu.gui.WgpuCanvasBase>`
that interactive examples and applications can be written in a
generic way (no-GUI specific code).
"""
def __init__(self, *args, **kwargs):
super().__init__(*args, **kwargs)
self._last_event_time = 0
self._pending_events = {}
self._event_handlers = defaultdict(list)

The _event_handlers changed in #569 from a set to a list, this got caught in our CI: https://github.com/fastplotlib/fastplotlib/actions/runs/10834428342/job/30229322490#step:9:1185

@almarklein almarklein merged commit 466af69 into pygfx:main Sep 17, 2024
@kushalkolar
Copy link
Copy Markdown
Contributor Author

any chance of a bugfix version soon? :) current release is broken with jupyter

@almarklein
Copy link
Copy Markdown
Member

current release is broken with jupyter

Because of what this pr fixes, or something else?

@almarklein
Copy link
Copy Markdown
Member

Ah, I can reproduce it. Release on the way!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants