diff --git a/HISTORY.rst b/HISTORY.rst index c1a8bd227..5febc04a0 100644 --- a/HISTORY.rst +++ b/HISTORY.rst @@ -11,6 +11,7 @@ Release History **BugFixes** - Exclude tests in package deployment (#184) +- Jupytext's serverextension only runs selected init steps (#185) - Added an additional test for magic arguments (#111) 1.0.0 (2019-02-19) diff --git a/jupytext/__init__.py b/jupytext/__init__.py index d86ceceb3..91a4781c8 100644 --- a/jupytext/__init__.py +++ b/jupytext/__init__.py @@ -30,12 +30,19 @@ def load_jupyter_server_extension(app): # pragma: no cover 'from {} to jupytext.TextFileContentsManager'.format(app.contents_manager_class.__name__)) 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() + # And rerun selected init steps from https://github.com/jupyter/notebook/blob/ + # 132f27306522b32fa667a6b208034cb7a04025c9/notebook/notebookapp.py#L1634-L1638 + + # app.init_configurables() + app.contents_manager = app.contents_manager_class(parent=app, log=app.log) + app.session_manager.contents_manager = app.contents_manager + + # app.init_components() + # app.init_webapp() + app.web_app.settings['contents_manager'] = app.contents_manager + + # app.init_terminals() + # app.init_signal() def _jupyter_nbextension_paths(): # pragma: no cover