summaryrefslogtreecommitdiffstats
path: root/contrib/python/ipython/py3/IPython/core/application.py
diff options
context:
space:
mode:
authorrobot-piglet <[email protected]>2026-05-30 14:16:45 +0300
committerrobot-piglet <[email protected]>2026-05-30 14:32:13 +0300
commite6497d440cfd398de50ee3a51c540849fb27b21c (patch)
tree449d1ec323f1aa85b61bc149fddd10873a2bd1b8 /contrib/python/ipython/py3/IPython/core/application.py
parent1468e6945304297062957504f6321f0f42d0f882 (diff)
Intermediate changes
commit_hash:b1a2baed63dc9e34cb8badb893f4196094751d4f
Diffstat (limited to 'contrib/python/ipython/py3/IPython/core/application.py')
-rw-r--r--contrib/python/ipython/py3/IPython/core/application.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/contrib/python/ipython/py3/IPython/core/application.py b/contrib/python/ipython/py3/IPython/core/application.py
index 841e867a747..2cc4bbdf915 100644
--- a/contrib/python/ipython/py3/IPython/core/application.py
+++ b/contrib/python/ipython/py3/IPython/core/application.py
@@ -33,10 +33,11 @@ from traitlets import (
)
if os.name == "nt":
+ # %PROGRAMDATA% is not safe by default, require opt-in to trust it
programdata = os.environ.get("PROGRAMDATA", None)
- if programdata is not None:
+ if os.environ.get("IPYTHON_USE_PROGRAMDATA") == "1" and programdata is not None:
SYSTEM_CONFIG_DIRS = [str(Path(programdata) / "ipython")]
- else: # PROGRAMDATA is not defined by default on XP.
+ else:
SYSTEM_CONFIG_DIRS = []
else:
SYSTEM_CONFIG_DIRS = [