Skip to content

Commit ce85355

Browse files
Set Jupyter platform directories environment variable to avoid DeprecationWarning
1 parent 29993b7 commit ce85355

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

tests/test_tutorials.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
import os
2+
3+
# Ensure Jupyter uses the new platformdirs paths to avoid DeprecationWarning
4+
# This will become the default in `jupyter_core` v6
5+
os.environ.setdefault("JUPYTER_PLATFORM_DIRS", "1")
6+
17
import contextlib
28
from pathlib import Path
39

0 commit comments

Comments
 (0)