Skip to content

ExtensionApp not compatible with extending ServerApp #395

@minrk

Description

@minrk

I'm investigating jupyterlab/jupyterlab#8807 and discovered that what should work:

from jupyterhub.singleuser import make_singleuser_app
from jupyterlab.labapp import LabApp
app = make_singleuser_app(LabApp)

doesn't. The immediate failure is:

AttributeError: 'LabApp' object has no attribute 'login_handler_class'

The underlying cause is that make_singleuser_app expects either the old NotebookApp or the new ServerApp, but LabApp is actually an ExtensionApp, which has a ServerApp rather than is a ServerApp. The underlying ServerApp class is not accessible (it is hardcoded to ServerApp), and thus not really extensible via normal means. This makes wrapping it not really feasible. Since LabApp is an app that launches a server, it seems like it should really be a ServerApp.

What's the best way to make LabApp or similar applications that really are server applications really extend ServerApp instead of this ExtensionApp wrapper? It seems like ExtensionApp should really subclass ServerApp and call super instead of initializing two global Application instances.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions