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

Stop using XDG_RUNTIME_DIR #143

Merged
merged 1 commit into from
Jun 13, 2019
Merged
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
17 changes: 4 additions & 13 deletions jupyter_core/paths.py
Original file line number Diff line number Diff line change
Expand Up @@ -90,24 +90,15 @@ def jupyter_runtime_dir():

Returns JUPYTER_RUNTIME_DIR if defined.

Respects XDG_RUNTIME_DIR on non-OS X, non-Windows,
falls back on data_dir/runtime otherwise.
The default is now (data_dir)/runtime on all platforms;
we no longer use XDG_RUNTIME_DIR after various problems.
"""
env = os.environ

if env.get('JUPYTER_RUNTIME_DIR'):
return env['JUPYTER_RUNTIME_DIR']

if sys.platform == 'darwin':
return pjoin(jupyter_data_dir(), 'runtime')
elif os.name == 'nt':
return pjoin(jupyter_data_dir(), 'runtime')
else:
# Linux, non-OS X Unix, AIX, etc.
xdg = env.get("XDG_RUNTIME_DIR", None)
if xdg:
return pjoin(xdg, 'jupyter')
return pjoin(jupyter_data_dir(), 'runtime')

return pjoin(jupyter_data_dir(), 'runtime')


if os.name == 'nt':
Expand Down