From 0c4d3f368f89145fce53c7634f5f8e442ae8e41e Mon Sep 17 00:00:00 2001 From: Vidar Tonaas Fauske Date: Fri, 27 May 2022 21:23:38 +0100 Subject: [PATCH] Make start_kernel env extend os.environ (#859) * Make start_kernel env extend os.environ * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> --- jupyter_server/services/sessions/sessionmanager.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/jupyter_server/services/sessions/sessionmanager.py b/jupyter_server/services/sessions/sessionmanager.py index a8e2347525..08c85f0bba 100644 --- a/jupyter_server/services/sessions/sessionmanager.py +++ b/jupyter_server/services/sessions/sessionmanager.py @@ -1,6 +1,7 @@ """A base class session manager.""" # Copyright (c) Jupyter Development Team. # Distributed under the terms of the Modified BSD License. +import os import pathlib import uuid @@ -274,7 +275,7 @@ async def start_kernel_for_session(self, session_id, path, name, type, kernel_na kernel_id = await self.kernel_manager.start_kernel( path=kernel_path, kernel_name=kernel_name, - env={"JPY_SESSION_NAME": path}, + env={**os.environ, "JPY_SESSION_NAME": path}, ) return kernel_id