◐ Shell
clean mode source ↗

Issue 32094: _args_from_interpreter_flags() doesn't keep -X options

`subprocess._args_from_interpreter_flags()` is used to control the flags passed to child Python processes, for example launched by multiprocessing.  Unfortunately, not all flags are actually recognized by this function:

$ ./python -X dev
Python 3.7.0a2+ (heads/master:895862a, Nov 20 2017, 19:15:23) 
[GCC 5.4.0 20160609] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import sys
>>> sys._xoptions
{'dev': True}
>>> import subprocess
>>> subprocess._args_from_interpreter_flags()
['-Wdefault']