Fixes issue #20954: _args_from_interpreter_flags used by multiprocessing
and some tests no longer behaves incorrectly in the presence of the
PYTHONHASHSEED environment variable.
diff --git a/Lib/subprocess.py b/Lib/subprocess.py
index f9e9104..4e7b064 100644
--- a/Lib/subprocess.py
+++ b/Lib/subprocess.py
@@ -498,7 +498,6 @@
'ignore_environment': 'E',
'verbose': 'v',
'bytes_warning': 'b',
- 'hash_randomization': 'R',
'py3k_warning': '3',
}
args = []
@@ -506,6 +505,8 @@
v = getattr(sys.flags, flag)
if v > 0:
args.append('-' + opt * v)
+ if getattr(sys.flags, 'hash_randomization') != 0:
+ args.append('-R')
for opt in sys.warnoptions:
args.append('-W' + opt)
return args