Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Revert "Re-use ServerApp.config_file_paths for consistency (#715)" #728

Merged
merged 1 commit into from
Mar 14, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 0 additions & 5 deletions jupyter_server/extension/application.py
Original file line number Diff line number Diff line change
Expand Up @@ -162,11 +162,6 @@ class method. This method can be set as a entry_point in
def _default_open_browser(self):
return self.serverapp.config["ServerApp"].get("open_browser", True)

@property
def config_file_paths(self):
"""Look on the same path as our parent for config files"""
return self.serverapp.config_file_paths

# The extension name used to name the jupyter config
# file, jupyter_{name}_config.
# This should also match the jupyter subcommand used to launch
Expand Down
7 changes: 6 additions & 1 deletion jupyter_server/serverapp.py
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,7 @@
base_flags,
base_aliases,
)
from jupyter_core.paths import jupyter_config_path
from jupyter_client import KernelManager
from jupyter_client.kernelspec import KernelSpecManager
from jupyter_client.session import Session
Expand Down Expand Up @@ -2153,7 +2154,11 @@ def find_server_extensions(self):
# This enables merging on keys, which we want for extension enabling.
# Regular config loading only merges at the class level,
# so each level clobbers the previous.
manager = ExtensionConfigManager(read_config_path=self.config_file_paths)
config_paths = jupyter_config_path()
if self.config_dir not in config_paths:
# add self.config_dir to the front, if set manually
config_paths.insert(0, self.config_dir)
manager = ExtensionConfigManager(read_config_path=config_paths)
extensions = manager.get_jpserver_extensions()

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