diff options
author | Richard Oudkerk <shibturn@gmail.com> | 2012-05-18 13:28:02 (GMT) |
---|---|---|
committer | Richard Oudkerk <shibturn@gmail.com> | 2012-05-18 13:28:02 (GMT) |
commit | 77c84f2defb0013e28d262be237142379a1407fe (patch) | |
tree | 16065331749bd8218eb74d80c9f10b54a816c0c5 /Lib/test/support.py | |
parent | cca802e354f776e79a55b3bc7dded6340b244824 (diff) | |
download | cpython-77c84f2defb0013e28d262be237142379a1407fe.zip cpython-77c84f2defb0013e28d262be237142379a1407fe.tar.gz cpython-77c84f2defb0013e28d262be237142379a1407fe.tar.bz2 |
#12098: Make multiprocessing's child processes inherit sys.flags on Windows
Initial patch by Sergey Mezentsev.
Diffstat (limited to 'Lib/test/support.py')
-rw-r--r-- | Lib/test/support.py | 20 |
1 files changed, 2 insertions, 18 deletions
diff --git a/Lib/test/support.py b/Lib/test/support.py index 4568e54..5259e27 100644 --- a/Lib/test/support.py +++ b/Lib/test/support.py @@ -1596,24 +1596,8 @@ def strip_python_stderr(stderr): def args_from_interpreter_flags(): """Return a list of command-line arguments reproducing the current settings in sys.flags and sys.warnoptions.""" - flag_opt_map = { - 'bytes_warning': 'b', - 'dont_write_bytecode': 'B', - 'hash_randomization': 'R', - 'ignore_environment': 'E', - 'no_user_site': 's', - 'no_site': 'S', - 'optimize': 'O', - 'verbose': 'v', - } - args = [] - for flag, opt in flag_opt_map.items(): - v = getattr(sys.flags, flag) - if v > 0: - args.append('-' + opt * v) - for opt in sys.warnoptions: - args.append('-W' + opt) - return args + from multiprocessing.util import _args_from_interpreter_flags + return _args_from_interpreter_flags() #============================================================ # Support for assertions about logging. |