Skip to content

Commit 6b3ee7d

Browse files
committed
add back logic that was accidently removed in new package name
1 parent c517811 commit 6b3ee7d

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

notebook_shim/nbserver.py

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -115,6 +115,21 @@ def sorted_extensions(self):
115115
config_dirs = jupyter_paths + [serverapp.config_dir]
116116
nbserver_extensions = get_nbserver_extensions(config_dirs)
117117

118+
# Link all extensions found in the old locations for
119+
# notebook server extensions.
120+
for name, enabled in nbserver_extensions.items():
121+
# If the extension is already enabled in the manager, i.e.
122+
# because it was discovered already by Jupyter Server
123+
# through its jupyter_server_config, then don't re-enable here.
124+
if name not in manager.extensions:
125+
successful = manager.add_extension(name, enabled=enabled)
126+
if successful:
127+
logger.info(
128+
"{name} | extension was found and enabled by notebook_shim. "
129+
"Consider moving the extension to Jupyter Server's "
130+
"extension paths.".format(name=name)
131+
)
132+
manager.link_extension(name)
118133

119134
def _load_jupyter_server_extension(serverapp):
120135
# Patch the config service manager to find the

0 commit comments

Comments
 (0)