Skip to content

Custom manager classes in both notebook vs. jupyter_server #41

@kevin-bates

Description

@kevin-bates

Currently, the way we check the *_manager_class traits (i.e. kernel_manager_class, contents_manager_class, etc.) prevents anyone from creating a custom class that works with both notebook and jupyter_server. That's because the Type() trait checks that the custom class inherits from a manager of one of these packages, not both.

You will either see:

The 'contents_manager_class' trait of a ServerApp instance expected a subclass of 'jupyter_server.services.contents.manager.ContentsManager', ...

if you inherit the base class from notebook, or

The 'contents_manager_class' trait of a NotebookApp instance expected a subclass of 'notebook.services.contents.manager.ContentsManager',

if you inherit from jupyter_server. There is no way to make a manager compatible with both servers.

This is something we'll likely want nbclassic to address, since it acts as the bridge between the two packages.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions