Skip to content

Commit

Permalink
Merge pull request #166 from dotlambda/notebook-7-compat
Browse files Browse the repository at this point in the history
notebook v7 compatibility
  • Loading branch information
RRosio authored Sep 29, 2023
2 parents 0f41610 + a600cef commit 793e284
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 7 deletions.
1 change: 1 addition & 0 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ def main():
install_requires=[
'jupyter_contrib_core >=0.3.3',
'jupyter_core',
'jupyter_server',
'notebook >=6.0',
'pyyaml',
'tornado',
Expand Down
14 changes: 7 additions & 7 deletions src/jupyter_nbextensions_configurator/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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)

Expand All @@ -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)

Expand Down

0 comments on commit 793e284

Please sign in to comment.