Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 11 additions & 3 deletions src/jupyter_nbextensions_configurator/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,17 @@
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
try:
# When Notebook < 7 is available, the import the Notebook handlers
from notebook.base.handlers import APIHandler
from notebook.base.handlers import IPythonHandler as JupyterHandler
from notebook.utils import url_path_join as ujoin
from notebook.utils import path2url
except ModuleNotFoundError as e:
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 tornado import web

Expand Down