Skip to content

Commit 262cb46

Browse files
authored
Revert "Re-use ServerApp.config_file_paths for consistency (#715)" (#728)
1 parent a2d11ab commit 262cb46

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

jupyter_server/extension/application.py

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -162,11 +162,6 @@ class method. This method can be set as a entry_point in
162162
def _default_open_browser(self):
163163
return self.serverapp.config["ServerApp"].get("open_browser", True)
164164

165-
@property
166-
def config_file_paths(self):
167-
"""Look on the same path as our parent for config files"""
168-
return self.serverapp.config_file_paths
169-
170165
# The extension name used to name the jupyter config
171166
# file, jupyter_{name}_config.
172167
# This should also match the jupyter subcommand used to launch

jupyter_server/serverapp.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,7 @@
104104
base_flags,
105105
base_aliases,
106106
)
107+
from jupyter_core.paths import jupyter_config_path
107108
from jupyter_client import KernelManager
108109
from jupyter_client.kernelspec import KernelSpecManager
109110
from jupyter_client.session import Session
@@ -2153,7 +2154,11 @@ def find_server_extensions(self):
21532154
# This enables merging on keys, which we want for extension enabling.
21542155
# Regular config loading only merges at the class level,
21552156
# so each level clobbers the previous.
2156-
manager = ExtensionConfigManager(read_config_path=self.config_file_paths)
2157+
config_paths = jupyter_config_path()
2158+
if self.config_dir not in config_paths:
2159+
# add self.config_dir to the front, if set manually
2160+
config_paths.insert(0, self.config_dir)
2161+
manager = ExtensionConfigManager(read_config_path=config_paths)
21572162
extensions = manager.get_jpserver_extensions()
21582163

21592164
for modulename, enabled in sorted(extensions.items()):

0 commit comments

Comments
 (0)