mirror of
https://github.com/jupyterhub/jupyterhub.git
synced 2025-10-17 15:03:02 +00:00
Use separate env_keep
defaults for LocalProcessSpawner
Since none of the current defaults (except `JUPYTERHUB_SINGLEUSER_APP`) make sense for spawners other than `LocalProcessSpawner`.
This commit is contained in:
@@ -701,17 +701,7 @@ class Spawner(LoggingConfigurable):
|
||||
)
|
||||
|
||||
env_keep = List(
|
||||
[
|
||||
'LD_LIBRARY_PATH',
|
||||
'PATH',
|
||||
'PYTHONPATH',
|
||||
'CONDA_ROOT',
|
||||
'CONDA_DEFAULT_ENV',
|
||||
'VIRTUAL_ENV',
|
||||
'LANG',
|
||||
'LC_ALL',
|
||||
'JUPYTERHUB_SINGLEUSER_APP',
|
||||
],
|
||||
['JUPYTERHUB_SINGLEUSER_APP'],
|
||||
help="""
|
||||
List of environment variables for the single-user server to inherit from the JupyterHub process.
|
||||
|
||||
@@ -1717,6 +1707,20 @@ class LocalProcessSpawner(Spawner):
|
||||
""",
|
||||
)
|
||||
|
||||
@default("env_keep")
|
||||
def _env_keep_default(self):
|
||||
return [
|
||||
"CONDA_DEFAULT_ENV",
|
||||
"CONDA_ROOT",
|
||||
"JUPYTERHUB_SINGLEUSER_APP",
|
||||
"LANG",
|
||||
"LC_ALL",
|
||||
"LD_LIBRARY_PATH",
|
||||
"PATH",
|
||||
"PYTHONPATH",
|
||||
"VIRTUAL_ENV",
|
||||
]
|
||||
|
||||
def make_preexec_fn(self, name):
|
||||
"""
|
||||
Return a function that can be used to set the user id of the spawned process to user with name `name`
|
||||
|
Reference in New Issue
Block a user