Skip to content

Commit 793e284

Browse files
authored
Merge pull request #166 from dotlambda/notebook-7-compat
notebook v7 compatibility
2 parents 0f41610 + a600cef commit 793e284

File tree

2 files changed

+8
-7
lines changed

2 files changed

+8
-7
lines changed

setup.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@ def main():
5555
install_requires=[
5656
'jupyter_contrib_core >=0.3.3',
5757
'jupyter_core',
58+
'jupyter_server',
5859
'notebook >=6.0',
5960
'pyyaml',
6061
'tornado',

src/jupyter_nbextensions_configurator/__init__.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,10 @@
1414
import re
1515

1616
import yaml
17+
from jupyter_server.base.handlers import APIHandler, JupyterHandler
18+
from jupyter_server.utils import url_path_join as ujoin
19+
from jupyter_server.utils import path2url
1720
from notebook._version import version_info as nb_version_info
18-
from notebook.base.handlers import APIHandler, IPythonHandler
19-
from notebook.utils import url_path_join as ujoin
20-
from notebook.utils import path2url
2121
from tornado import web
2222

2323
# attempt to use LibYaml if available
@@ -184,10 +184,10 @@ def get(self):
184184
self.finish(json.dumps(extension_list))
185185

186186

187-
class NBExtensionHandlerPage(IPythonHandler):
187+
class NBExtensionHandlerPage(JupyterHandler):
188188
"""Renders the nbextension configuration interface."""
189189

190-
@IPythonHandler.log.getter
190+
@JupyterHandler.log.getter
191191
def log(self):
192192
return ConfiguratorLogger(super(NBExtensionHandlerPage, self).log)
193193

@@ -201,10 +201,10 @@ def get(self):
201201
))
202202

203203

204-
class RenderExtensionHandler(IPythonHandler):
204+
class RenderExtensionHandler(JupyterHandler):
205205
"""Renders markdown files as pages."""
206206

207-
@IPythonHandler.log.getter
207+
@JupyterHandler.log.getter
208208
def log(self):
209209
return ConfiguratorLogger(super(RenderExtensionHandler, self).log)
210210

0 commit comments

Comments
 (0)