From 58f281c7fc8b7793c0c2abdeb3f8cfb74581c6ca Mon Sep 17 00:00:00 2001 From: Nathaniel Nicandro Date: Thu, 7 May 2020 15:22:52 -0500 Subject: [PATCH] Remove `conn` slot of a client and `clients` slot of a kernel --- jupyter-client.el | 8 ++++---- jupyter-kernel.el | 5 +---- 2 files changed, 5 insertions(+), 8 deletions(-) diff --git a/jupyter-client.el b/jupyter-client.el index d1052fb..a35dd28 100644 --- a/jupyter-client.el +++ b/jupyter-client.el @@ -212,8 +212,6 @@ client is expecting a reply from the kernel.") initializing this client. When `jupyter-start-channels' is called, this will be set to the kernel info plist returned from an initial `:kernel-info-request'.") - (conn - :documentation "A `jupyter-connection' representing the client-kernel connection.") (session :type jupyter-session :documentation "The session for this client.") @@ -310,8 +308,10 @@ method is called." (cl-defmethod jupyter-kernel-alive-p ((client jupyter-kernel-client)) "Return non-nil if the kernel CLIENT is connected to is alive." - (and (slot-boundp client 'conn) - (jupyter-alive-p (oref client conn)))) + (when-let* ((kernel (jupyter-kernel client))) + (and (slot-boundp client 'conn) + (jupyter-alive-p kernel) + (jupyter-alive-p (jupyter-io kernel))))) (cl-defmethod jupyter-clients () "Return a list of all `jupyter-kernel-client' objects." diff --git a/jupyter-kernel.el b/jupyter-kernel.el index 90f7a1d..18079af 100644 --- a/jupyter-kernel.el +++ b/jupyter-kernel.el @@ -43,10 +43,7 @@ :type jupyter-kernelspec :documentation "The kernelspec of this kernel.") ;; FIXME: Remove this slot, used by `jupyter-widget-client'. - (session nil :type jupyter-session) - (clients nil - :type (list-of jupyter-kernel-client) - :documentation "List of clients able to receive messages.")) + (session nil :type jupyter-session)) (cl-defmethod jupyter-alive-p ((kernel jupyter-kernel)) "Return non-nil if KERNEL has been launched."