diff --git a/jupyter-config/jupyter_notebook_config.d/jupytext.json b/jupyter-config/jupyter_notebook_config.d/jupytext.json index 56f59be4b..86608d7dc 100644 --- a/jupyter-config/jupyter_notebook_config.d/jupytext.json +++ b/jupyter-config/jupyter_notebook_config.d/jupytext.json @@ -1,5 +1,7 @@ { "NotebookApp": { - "contents_manager_class": "jupytext.TextFileContentsManager" + "nbserver_extensions": { + "jupytext": true + } } } diff --git a/jupytext/__init__.py b/jupytext/__init__.py index b1ae6cdea..2528427dd 100644 --- a/jupytext/__init__.py +++ b/jupytext/__init__.py @@ -15,6 +15,22 @@ def __init__(self): raise self.err +def load_jupyter_server_extension(app): # pragma: no cover + """Use Jupytext's contents manager""" + # The server extension call is too late! + # The contents manager was set at NotebookApp.init_configurables + + # Let's change the contents manager class + app.contents_manager_class = TextFileContentsManager + + # And rerun the init steps from then to now + app.init_configurables() + app.init_components() + app.init_webapp() + app.init_terminals() + app.init_signal() + + def _jupyter_nbextension_paths(): # pragma: no cover """Allows commands like jupyter nbextension install --py jupytext diff --git a/jupytext/version.py b/jupytext/version.py index 9f46bf9d2..70e8be200 100644 --- a/jupytext/version.py +++ b/jupytext/version.py @@ -1,3 +1,3 @@ """Jupytext's version number""" -__version__ = '1.0.0-rc4' +__version__ = '1.0.0-rc4+dev'