chore: upgrade jupyter runtimelib to 0.11.0 (#24036)

Brings in:

* More fully typed structures (for when we get to implementing more)
* `with_metadata`, `with_buffers`, etc. from
https://github.com/runtimed/runtimed/pull/99

---------

Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
This commit is contained in:
Kyle Kelley 2024-05-29 15:46:47 -07:00 committed by GitHub
parent 3d3722507e
commit cf611fbf54
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
6 changed files with 28 additions and 32 deletions

View file

@ -4,10 +4,10 @@ use std::cell::RefCell;
use std::rc::Rc;
use std::sync::Arc;
use runtimelib::JupyterMessage;
use runtimelib::JupyterMessageContent;
use runtimelib::KernelIoPubConnection;
use runtimelib::StreamContent;
use jupyter_runtime::JupyterMessage;
use jupyter_runtime::JupyterMessageContent;
use jupyter_runtime::KernelIoPubConnection;
use jupyter_runtime::StreamContent;
use deno_core::error::AnyError;
use deno_core::op2;
@ -65,12 +65,9 @@ pub async fn op_jupyter_broadcast(
err
})?;
let mut jupyter_message = JupyterMessage::new(content, Some(&last_request));
jupyter_message.metadata = metadata;
jupyter_message.buffers =
buffers.into_iter().map(|b| b.to_vec().into()).collect();
jupyter_message.set_parent(last_request);
let jupyter_message = JupyterMessage::new(content, Some(&last_request))
.with_metadata(metadata)
.with_buffers(buffers.into_iter().map(|b| b.to_vec().into()).collect());
(iopub_connection.lock().await)
.send(jupyter_message)