Skip to content

Add notebook 7 compatibility #171

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
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
8 changes: 8 additions & 0 deletions src/jupyter_nbextensions_configurator/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,14 @@
except ImportError:
from yaml import SafeLoader

if nb_version_info > (7,):
from nbclassic import shim_notebook, nbextensions, notebookapp, tests
import sys
shim_notebook()
sys.modules['notebook.nbextensions'] = nbextensions
sys.modules['notebook.notebookapp'] = notebookapp
sys.modules['notebook.tests'] = tests

if nb_version_info < (5, 2, 0):
from notebook.base.handlers import json_errors
else:
Expand Down