diff --git a/setup.py b/setup.py index 8e1dddc..f12ef9f 100755 --- a/setup.py +++ b/setup.py @@ -55,6 +55,7 @@ def main(): install_requires=[ 'jupyter_contrib_core >=0.3.3', 'jupyter_core', + 'jupyter_server', 'notebook >=6.0', 'pyyaml', 'tornado', diff --git a/src/jupyter_nbextensions_configurator/__init__.py b/src/jupyter_nbextensions_configurator/__init__.py index 87fd3b1..7a39289 100644 --- a/src/jupyter_nbextensions_configurator/__init__.py +++ b/src/jupyter_nbextensions_configurator/__init__.py @@ -14,10 +14,10 @@ import re import yaml +from jupyter_server.base.handlers import APIHandler, JupyterHandler +from jupyter_server.utils import url_path_join as ujoin +from jupyter_server.utils import path2url from notebook._version import version_info as nb_version_info -from notebook.base.handlers import APIHandler, IPythonHandler -from notebook.utils import url_path_join as ujoin -from notebook.utils import path2url from tornado import web # attempt to use LibYaml if available @@ -184,10 +184,10 @@ def get(self): self.finish(json.dumps(extension_list)) -class NBExtensionHandlerPage(IPythonHandler): +class NBExtensionHandlerPage(JupyterHandler): """Renders the nbextension configuration interface.""" - @IPythonHandler.log.getter + @JupyterHandler.log.getter def log(self): return ConfiguratorLogger(super(NBExtensionHandlerPage, self).log) @@ -201,10 +201,10 @@ def get(self): )) -class RenderExtensionHandler(IPythonHandler): +class RenderExtensionHandler(JupyterHandler): """Renders markdown files as pages.""" - @IPythonHandler.log.getter + @JupyterHandler.log.getter def log(self): return ConfiguratorLogger(super(RenderExtensionHandler, self).log)