multiplex on a 'channel' key in message,
rather than separate websockets.
Unlike zmq, there aren't different message patterns that require the channels to be separate.
Reduces FD count by factor of 3 and connection complexity in js.
file_to_run and notebook_dir would collide, with possible dictionary
ordering randomness depending on how they were passed.
With this change, the default value of notebook_dir is pulled from
file_to_run, instead of pushing the value when file_to_run is changed.
This makes it possible to specify both and have the server behave as
expected.
store the Future for the initial request,
allowing subsequent requests to wait on the same pending reply.
Previously, any incoming requests that arrived while waiting for the first reply would send their own request.
- add debug statement at the very beginning of a web socket request
- add debug statement in open, indicating that the connection has been accepted
- add timeout, so failed or slow kernel_info doesn't cause the request to never get a response
- don't send kernel_info_request before authenticating the request
The last one required some icky coroutine shenanigans,
because of our subclass structure, but it should work fine.
WebSocket connections will not open until kernel_info is retrieved,
removing a race condition waiting for the reply to indicate adaptation,
which could result in a v5 message being sent to a v4 kernel.
The reply is cached, so that it need not be requested on each new connection.
can happen if a message is waiting in a pipe and the web socket is closed before the message is handled.
And give ZMQChannels a nice repr with their kernel ID
- set linger on sockets (avoid hang on exit)
- actually close sockets, not just zmq streams (blame pyzmq, aka me)
seems to be necessary for js/notebook/shutdown test to avoid hanging on Python 3.4.
- add NotebookApp.notebook_dir
- add KernelManager.root_dir
- remove NotebookManager.notebook_dir, move to FileNBM.notebook_dir
Default value for KM.root_dir and fNBM.notebook_dir is NotebookApp.notebook_dir, but they can be configured separately.
SessionManager passes the API path to KernelManager,
which is responsible for turning it into the kernel's cwd.