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.
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 thehandle_binary
expects aDataView
but new versions of Jupyterlab will pass it anArrayBuffer
.Since Jupyterlab v4.0.0a21 the buffers deserialized from a
KernelMessage
are now of typeArrayBuffer
instead of theDataView
typehandle_binary
expects. However, it turns out that the spec forKernelMessage.IMessage
has always specified that buffers could be either anArrayBuffer
or anArrayBufferView
. This commit ensures either type is accepted.