Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make handle_binary compliant with the KernelMessage.IMessage spec #505

Merged
merged 2 commits into from Dec 19, 2022

Conversation

mctoohey
Copy link

I found that ipympl was failing to display plots on more recent versions of the Jupyterlab 4.0 prereleases. This pull request fixes an issue where the handle_binary expects a DataView but new versions of Jupyterlab will pass it an ArrayBuffer.

Since Jupyterlab v4.0.0a21 the buffers deserialized from a KernelMessage are now of type ArrayBuffer instead of the DataView type handle_binary expects. However, it turns out that the spec for KernelMessage.IMessage has always specified that buffers could be either an ArrayBuffer or an ArrayBufferView. This commit ensures either type is accepted.

Since Jupyterlab v4.0.0a21 the buffers deserialized from a KernelMessage
are now of type ArrayBuffer instead of the DataView type
handle_binary expects. However, it turns out that the spec for
KernelMessage.IMessage has always specifed that buffers could be
either an ArrayBuffer or an ArrayBufferView. This commit ensures
either type is accepted.
@github-actions
Copy link
Contributor

Binder 👈 Launch a binder notebook on branch mctoohey/ipympl/main

Copy link
Member

@martinRenou martinRenou left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! The CI failures are unrelated (Python 3.11 broke our CI, we need to fix it separately)

@martinRenou martinRenou merged commit fa3e807 into matplotlib:main Dec 19, 2022
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.

None yet

2 participants