diff --git a/HISTORY.rst b/HISTORY.rst index d6f77377b..fc09b1110 100644 --- a/HISTORY.rst +++ b/HISTORY.rst @@ -3,6 +3,15 @@ Release History --------------- +1.1.1 (2019-04-16) +++++++++++++++++++++++ + +**Improvements** + +- Jupytext server extension leaves the contents manager unchanged when it is already a subclass of TextFileContentsManager (#218) +- The base class for TextFileContentsManager defaults to FileContentsManager when LargeFileManager is not available (#217) + + 1.1.0 (2019-04-14) ++++++++++++++++++++++ diff --git a/jupytext/__init__.py b/jupytext/__init__.py index 4d966e728..fd26deef0 100644 --- a/jupytext/__init__.py +++ b/jupytext/__init__.py @@ -11,15 +11,15 @@ class TextFileContentsManager: """A class that raises the previous ImportError""" err = err - def __init__(self): + def __init__(self, parent=None, log=None): # noqa raise self.err def load_jupyter_server_extension(app): # pragma: no cover """Use Jupytext's contents manager""" - if app.contents_manager_class == TextFileContentsManager: + if isinstance(app.contents_manager_class, TextFileContentsManager): app.log.info("[Jupytext Server Extension] NotebookApp.contents_manager_class is " - "jupytext.TextFileContentsManager already - OK") + "(a subclass of) jupytext.TextFileContentsManager already - OK") return # The server extension call is too late! diff --git a/jupytext/contentsmanager.py b/jupytext/contentsmanager.py index cd3c09ac4..659e2b27e 100644 --- a/jupytext/contentsmanager.py +++ b/jupytext/contentsmanager.py @@ -14,7 +14,12 @@ except ImportError: pass -from notebook.services.contents.largefilemanager import LargeFileManager +try: + from notebook.services.contents.largefilemanager import LargeFileManager +except ImportError: + # Older versions of notebook do not have the LargeFileManager #217 + from notebook.services.contents.filemanager import FileContentsManager as LargeFileManager + from jupyter_client.kernelspec import find_kernel_specs, get_kernel_spec from .jupytext import reads, writes, create_prefix_dir diff --git a/jupytext/version.py b/jupytext/version.py index a5567ef6d..6da904d80 100644 --- a/jupytext/version.py +++ b/jupytext/version.py @@ -1,3 +1,3 @@ """Jupytext's version number""" -__version__ = '1.1.0' +__version__ = '1.1.1'