Skip to content

Commit

Permalink
Extract out kernels
Browse files Browse the repository at this point in the history
  • Loading branch information
davidbrochart committed Nov 30, 2022
1 parent 5965c7f commit 93bf8ae
Show file tree
Hide file tree
Showing 16 changed files with 52 additions and 2,151 deletions.
8 changes: 8 additions & 0 deletions jupyter_server/base/handlers.py
Original file line number Diff line number Diff line change
Expand Up @@ -322,6 +322,14 @@ def contents_manager(self):

@property
def session_manager(self):
if "session_manager" not in self.settings:
self.settings["session_manager"] = self.settings["session_manager_class"](
parent=self.serverapp,
log=self.settings["log"],
kernel_manager=self.settings["kernel_manager"],
contents_manager=self.contents_manager,
)

return self.settings["session_manager"]

@property
Expand Down
2 changes: 1 addition & 1 deletion jupyter_server/base/zmqhandlers.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
from tornado.websocket import WebSocketHandler

from jupyter_server.base.websocket import WebSocketMixin
from jupyter_server.services.kernels.connection.base import (
from jupyter_server_kernels.kernels.connection.base import (
deserialize_binary_message,
deserialize_msg_from_ws_v1,
serialize_binary_message,
Expand Down
2 changes: 1 addition & 1 deletion jupyter_server/gateway/managers.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,12 @@
from jupyter_client.kernelspec import KernelSpecManager
from jupyter_client.manager import AsyncKernelManager
from jupyter_client.managerabc import KernelManagerABC
from jupyter_server_kernels.kernels.kernelmanager import AsyncMappingKernelManager
from tornado import web
from tornado.escape import json_decode, json_encode, url_escape, utf8
from traitlets import DottedObjectName, Instance, Type, default

from .._tz import UTC
from ..services.kernels.kernelmanager import AsyncMappingKernelManager
from ..services.sessions.sessionmanager import SessionManager
from ..utils import ensure_async, url_path_join
from .gateway_client import GatewayClient, gateway_request
Expand Down
2 changes: 1 addition & 1 deletion jupyter_server/kernelspecs/handlers.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
from jupyter_server.auth import authorized

from ..base.handlers import JupyterHandler
from ..services.kernelspecs.handlers import kernel_name_regex
from jupyter_server_kernels.kernelspecs.handlers import kernel_name_regex

AUTH_RESOURCE = "kernelspecs"

Expand Down
Loading

0 comments on commit 93bf8ae

Please sign in to comment.