Skip to content

Commit

Permalink
Merge pull request #22382 from ccordoba12/pass-tmpdir-to-kernels
Browse files Browse the repository at this point in the history
PR: Pass `TMPDIR` env var to kernels (IPython console)
  • Loading branch information
ccordoba12 authored Aug 25, 2024
2 parents 02a3669 + 06e9ccb commit dcd1afa
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 6 deletions.
6 changes: 3 additions & 3 deletions external-deps/spyder-kernels/.gitrepo

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 6 additions & 1 deletion spyder/plugins/ipythonconsole/utils/kernelspec.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,10 @@
from spyder.utils.environ import clean_env, get_user_environment_variables
from spyder.utils.misc import get_python_executable
from spyder.utils.programs import (
get_module_version,
get_temp_dir,
is_python_interpreter,
is_module_installed,
get_module_version
)

# Constants
Expand Down Expand Up @@ -195,6 +196,10 @@ def env(self):
'SPY_TESTING': running_under_pytest() or get_safe_mode(),
'SPY_HIDE_CMD': self.get_conf('hide_cmd_windows'),
'SPY_PYTHONPATH': pypath,
# This env var avoids polluting the OS default temp directory with
# files generated by `conda run`. It's removed in the kernel after
# initialization to not affect users code.
"TMPDIR": get_temp_dir(),
})

# App considerations
Expand Down

0 comments on commit dcd1afa

Please sign in to comment.