Remove conn slot of a client and clients slot of a kernel

This commit is contained in:
Nathaniel Nicandro 2020-05-07 15:22:52 -05:00
parent 4abf0d0714
commit 58f281c7fc
2 changed files with 5 additions and 8 deletions

View file

@ -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."

View file

@ -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."