diff --git a/jupyter_server/base/zmqhandlers.py b/jupyter_server/base/zmqhandlers.py index 2a328a90f9..e9662cb667 100644 --- a/jupyter_server/base/zmqhandlers.py +++ b/jupyter_server/base/zmqhandlers.py @@ -2,15 +2,15 @@ # Raise a warning that this module is deprecated. import warnings -from tornado.websocket import WebSocketHandler - -from jupyter_server.base.websocket import WebSocketMixin from jupyter_server_kernels.kernels.connection.base import ( deserialize_binary_message, deserialize_msg_from_ws_v1, serialize_binary_message, serialize_msg_to_ws_v1, ) +from tornado.websocket import WebSocketHandler + +from jupyter_server.base.websocket import WebSocketMixin warnings.warn( "jupyter_server.base.zmqhandlers module is deprecated in Jupyter Server 2.0", diff --git a/jupyter_server/kernelspecs/handlers.py b/jupyter_server/kernelspecs/handlers.py index 76cd69662e..5db8421c68 100644 --- a/jupyter_server/kernelspecs/handlers.py +++ b/jupyter_server/kernelspecs/handlers.py @@ -1,9 +1,9 @@ +from jupyter_server_kernels.kernelspecs.handlers import kernel_name_regex from tornado import web from jupyter_server.auth import authorized from ..base.handlers import JupyterHandler -from jupyter_server_kernels.kernelspecs.handlers import kernel_name_regex AUTH_RESOURCE = "kernelspecs" diff --git a/jupyter_server/serverapp.py b/jupyter_server/serverapp.py index c09a758952..84242582d8 100644 --- a/jupyter_server/serverapp.py +++ b/jupyter_server/serverapp.py @@ -86,12 +86,13 @@ from jupyter_server.extension.config import ExtensionConfigManager from jupyter_server.extension.manager import ExtensionManager from jupyter_server.extension.serverextension import ServerExtensionApp -#from jupyter_server.gateway.managers import ( + +# from jupyter_server.gateway.managers import ( # GatewayClient, # GatewayKernelSpecManager, # GatewayMappingKernelManager, # GatewaySessionManager, -#) +# ) from jupyter_server.log import log_request from jupyter_server.services.config import ConfigManager from jupyter_server.services.contents.filemanager import ( @@ -414,7 +415,7 @@ def init_handlers(self, default_services, settings): handlers.extend(settings["identity_provider"].get_handlers()) # If gateway mode is enabled, replace appropriate handlers to perform redirection - #if GatewayClient.instance().gateway_enabled: + # if GatewayClient.instance().gateway_enabled: # # for each handler required for gateway, locate its pattern # # in the current list and replace that entry... # gateway_handlers = load_handlers("jupyter_server.gateway.handlers") @@ -760,10 +761,10 @@ class ServerApp(JupyterApp): AsyncContentsManager, AsyncFileContentsManager, NotebookNotary, - #GatewayMappingKernelManager, - #GatewayKernelSpecManager, - #GatewaySessionManager, - #GatewayClient, + # GatewayMappingKernelManager, + # GatewayKernelSpecManager, + # GatewaySessionManager, + # GatewayClient, Authorizer, EventLogger, ] @@ -1440,7 +1441,7 @@ def template_file_path(self): @default("session_manager_class") def _default_session_manager_class(self): - #if self.gateway_config.gateway_enabled: + # if self.gateway_config.gateway_enabled: # return "jupyter_server.gateway.managers.GatewaySessionManager" return SessionManager @@ -1465,7 +1466,7 @@ def _default_session_manager_class(self): @default("kernel_spec_manager_class") def _default_kernel_spec_manager_class(self): - #if self.gateway_config.gateway_enabled: + # if self.gateway_config.gateway_enabled: # return "jupyter_server.gateway.managers.GatewayKernelSpecManager" return KernelSpecManager @@ -1765,7 +1766,7 @@ def init_configurables(self): # If gateway server is configured, replace appropriate managers to perform redirection. To make # this determination, instantiate the GatewayClient config singleton. - #self.gateway_config = GatewayClient.instance(parent=self) + # self.gateway_config = GatewayClient.instance(parent=self) if not issubclass(self.contents_manager_class, AsyncContentsManager): warnings.warn( @@ -2472,7 +2473,7 @@ def running_server_info(self, kernel_count=True): version=ServerApp.version, url=self.display_url ) ) - #if self.gateway_config.gateway_enabled: + # if self.gateway_config.gateway_enabled: # info += ( # _i18n("\nKernels will be managed by the Gateway server running at:\n%s") # % self.gateway_config.url