diff --git a/jupyter_server/extension/application.py b/jupyter_server/extension/application.py index e5cb6bcafd..6f4b9a1c17 100644 --- a/jupyter_server/extension/application.py +++ b/jupyter_server/extension/application.py @@ -174,7 +174,10 @@ def _default_open_browser(self): @classmethod def get_extension_package(cls): - return cls.__module__.split('.')[0] + parts = cls.__module__.split('.') + if '(namespace)' not in str(__import__(parts[0])): + return parts[0] + return '.'.join(parts[0:2]) @classmethod def get_extension_point(cls):