Commit graph

1918 commits

Author SHA1 Message Date
Nathaniel Nicandro
8f9f563afc Fix test 2023-02-13 20:22:49 -06:00
Nathaniel Nicandro
e6ef8bb672 Fix unused lexical variable 2023-02-13 20:22:49 -06:00
Nathaniel Nicandro
9a1321f35d Fix undefined function 2023-02-13 20:22:49 -06:00
Nathaniel Nicandro
2d807d8670 Replace uses of jupyter-clients
This function is used elsewhere.
2023-02-13 20:22:49 -06:00
Nathaniel Nicandro
b5fac750e3 Remove setting of conn slot of a client in tests 2023-02-13 20:22:49 -06:00
Nathaniel Nicandro
f627175f57 Update jupyter-client to get rid off jupyter-connection-hb 2023-02-13 20:22:49 -06:00
Nathaniel Nicandro
d4d1e1e48c Fix byte compiler warnings for jupyter--kernel-processes 2023-02-13 20:22:49 -06:00
Nathaniel Nicandro
3a3bfcc631 Simplify jupyter-restart
No need to do anything about client connections here.  Leave that up
to the kernel implementations.
2023-02-13 20:22:49 -06:00
Nathaniel Nicandro
4393e8adb0 Update tests for jupyter-kernel-process 2023-02-13 20:22:49 -06:00
Nathaniel Nicandro
d18c41c9af Doc changes on jupyter--kernel-processes 2023-02-13 20:22:49 -06:00
Nathaniel Nicandro
f534172049 Remove jupyter--kernel-died-process-sentinel
Replace with a function passed to `jupyter-launch`

- Getting wrong number of argument errors on the method
- Also mention that the `jupyter-kernel-died` function should have
  been called only when the process status is signal.
2023-02-13 20:22:49 -06:00
Nathaniel Nicandro
874cc9c043 Remove the process slot of a jupyter-kernel-process
Since the `jupyter--kernel-processes` list exists it is redundant.
2023-02-13 20:22:49 -06:00
Nathaniel Nicandro
7ee40e1633 Launch kernel before connecting a client 2023-02-13 20:22:49 -06:00
Nathaniel Nicandro
4e951052c0 Default connection for jupyter-kernel 2023-02-13 20:22:49 -06:00
Nathaniel Nicandro
9519daa105 Document jupyter-server-kernel 2023-02-13 20:22:49 -06:00
Nathaniel Nicandro
b98b6bc5d8 Use the 'auth-headers action 2023-02-13 20:22:49 -06:00
Nathaniel Nicandro
7fa06ca5f9 Doc and comments 2023-02-13 20:22:49 -06:00
Nathaniel Nicandro
4c2752ef3b Add jupyter-run-handlers macro 2023-02-13 20:22:49 -06:00
Nathaniel Nicandro
31409cf449 Remove document duplication 2023-02-13 20:22:49 -06:00
Nathaniel Nicandro
f32cd090e1 Start using the new interface in jupyter-client.el 2023-02-13 20:22:49 -06:00
Nathaniel Nicandro
9ab2762323 Remove ref to jupyter-connection-hb 2023-02-13 20:22:49 -06:00
Nathaniel Nicandro
2d8018b7f3 Remove jupyter-event-handler 2023-02-13 20:22:45 -06:00
Nathaniel Nicandro
66ee784b22 Fix typo 2023-02-13 20:21:14 -06:00
Nathaniel Nicandro
7a52f6240d Update jupyter-kernel-process test 2023-02-13 20:21:14 -06:00
Nathaniel Nicandro
140284de80 Re-word doc of jupyter--kernel-processes 2023-02-13 20:21:14 -06:00
Nathaniel Nicandro
4c41ea176f Use an extra jupyter-shutdown method to stop a kernel's IO 2023-02-13 20:21:14 -06:00
Nathaniel Nicandro
c30d2effaa Make the server slot of a jupyter-server-kernel read-only 2023-02-13 20:21:14 -06:00
Nathaniel Nicandro
3e40fde7ec Replacement for jupyter-conn-id 2023-02-13 20:21:14 -06:00
Nathaniel Nicandro
dc91912d5b Remove duplicated use of jupyter-session-with-random-ports
This is already done in `jupyter-launch`.
2023-02-13 20:21:14 -06:00
Nathaniel Nicandro
996d53e0b0 Use new connection interface in some places
* jupyter-repl.el
(jupyter-repl-kill-buffer-query-function): Use `jupyter-kernel`,
`jupyter-clients`, `jupyter-disconnect`, and `jupyter-shutdown`.
2023-02-13 20:21:14 -06:00
Nathaniel Nicandro
58f281c7fc Remove conn slot of a client and clients slot of a kernel 2023-02-13 20:21:14 -06:00
Nathaniel Nicandro
4abf0d0714 Cleanup whitespace 2023-02-13 20:21:14 -06:00
Nathaniel Nicandro
73955c2d14 Clarify the name of some internally used functions 2023-02-13 20:21:14 -06:00
Nathaniel Nicandro
d1a344a000 Do not specify jupyter-send' and jupyter-stop as specific to jupyter-channel` 2023-02-13 20:21:14 -06:00
Nathaniel Nicandro
55009e3a0d Use jupyter-session-endpoints in one place 2023-02-13 20:21:14 -06:00
Nathaniel Nicandro
9b2a66868a IO function and connections 2023-02-13 20:21:14 -06:00
Nathaniel Nicandro
eba2bcc280 Move initialization of ioloop into the context of the connection 2023-02-13 20:21:14 -06:00
Nathaniel Nicandro
5d6dd04949 Remove duplicated function call
* jupyter-kernel-process.el (jupyter-connection): Do it.
2023-02-13 20:21:14 -06:00
Nathaniel Nicandro
6ca11d695d Add a special case to the jupyter-send method of a client
This is to handle message relaying in `jupyter-widget-client`.

* jupyter-client.el (jupyter-send): Do it.  Update doc.

* jupyter-widget-client.el (jupyter-widgets-on-message): Change
  argument order of `jupyter-send` call.
2023-02-13 20:21:14 -06:00
Nathaniel Nicandro
754f3ed5ff Use jupyter-connection for jupyter-server-kernel objects
This fixes errors with jupyter--send being defined
2023-02-13 20:21:14 -06:00
Nathaniel Nicandro
31f0ef4f93 Add jupyter--kernel-connection
Also tidy up `jupyter-connection`
2023-02-13 20:21:14 -06:00
Nathaniel Nicandro
e111aba096 Move jupyter-(dis)?connect into the jupyter-connection interface
The former pair of methods were only used to connect clients and
kernels.
2023-02-13 20:21:14 -06:00
Nathaniel Nicandro
348df7feb5 Remove jupyter-send-* methods
These methods were not used much internally.
2023-02-13 20:21:14 -06:00
Nathaniel Nicandro
0c6d90cc7e Undo a client connection when a kernel doesn't respond
* jupyter-client.el (jupyter-client): Do it.
2023-02-13 20:21:14 -06:00
Nathaniel Nicandro
705462c35d Remove the need to start a connection before sending a message 2023-02-13 20:21:14 -06:00
Nathaniel Nicandro
b814e05223 Formalize jupyter-disconnect and jupyter-connect 2023-02-13 20:21:14 -06:00
Nathaniel Nicandro
9df6d01070 Move ioloop synchronization into server conn object 2023-02-13 20:21:14 -06:00
Nathaniel Nicandro
82e5a0fbc2 Remove jupyter-server-kernel-connected-p
This was mainly used when having to refresh the websocket connections
to a server after a REST request.  Refreshing the websocket
connections is now handled internally to the connection of a
`jupyter-server`.

* jupyter-server-kernel.el
(initialize-instance): Add `kernel-ids` variable, modify it when
connecting/disconnecting kernel channels to the server's websocket
connections.  When starting the subprocess that handles websocket
connections, re-connect any previously connected kernels.
(jupyter-server--refresh-comm): Remove.
(jupyter-server-kernel-connected-p): Remove.
(jupyter-api-request): Use `jupyter-start`/`jupyter-stop` when
refreshing websocket connections.
(jupyter-server--connect-channels): Use `jupyter-ioloop-wait-until`.
(jupyter-connection): Remove `jupyter-server-kernel-connected-p`
call.
2023-02-13 20:21:14 -06:00
Nathaniel Nicandro
5049cdf9ed jupyter-server-kernel.el organization
Also add missing `jupyter-connection` require.
2023-02-13 20:21:14 -06:00
Nathaniel Nicandro
8cd90fb9e0 Fix ordering of test cleanup
Stop the clients before stopping an connections to kernel servers.

* test/test-helper.el: Do it.
2023-02-13 20:21:14 -06:00