From ae5efbaf65d7297d7c8cad8606a148c32ebc3388 Mon Sep 17 00:00:00 2001 From: Anastasiia Sliusar Date: Thu, 29 Aug 2024 14:18:33 +0200 Subject: [PATCH] Rename a parameter --- jupyterlab_server/handlers.py | 8 ++++---- tests/test_labapp.py | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/jupyterlab_server/handlers.py b/jupyterlab_server/handlers.py index c4285b8..16890a3 100644 --- a/jupyterlab_server/handlers.py +++ b/jupyterlab_server/handlers.py @@ -84,15 +84,15 @@ def get_page_config(self) -> dict[str, Any]: base_url = self.settings.get("base_url") server_app = self.settings.get("serverapp") assert server_app is not None - if hasattr(server_app, "allow_setup_custom_env_variables"): - allow_setup_custom_env_variables = server_app.allow_setup_custom_env_variables + if hasattr(server_app, "accept_kernel_env_vars"): + accept_kernel_env_vars = server_app.accept_kernel_env_vars else: - allow_setup_custom_env_variables = False + accept_kernel_env_vars = False # Remove the trailing slash for compatibility with html-webpack-plugin. full_static_url = self.static_url_prefix.rstrip("/") page_config.setdefault("fullStaticUrl", full_static_url) - page_config.setdefault("allow_setup_custom_env_variables", allow_setup_custom_env_variables) + page_config.setdefault("accept_kernel_env_vars", accept_kernel_env_vars) page_config.setdefault("terminalsAvailable", terminals) page_config.setdefault("ignorePlugins", []) diff --git a/tests/test_labapp.py b/tests/test_labapp.py index a578c8f..6f2a525 100644 --- a/tests/test_labapp.py +++ b/tests/test_labapp.py @@ -60,7 +60,7 @@ def ispath(p): nondirs = {k: v for k, v in page_config.items() if not ispath(k)} assert nondirs == { - "allow_setup_custom_env_variables": False, + "accept_kernel_env_vars": False, "appName": "JupyterLab Server Application", "appNamespace": "jupyterlab_server", "appUrl": "/lab",