This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Title: _args_from_interpreter_flags() doesn't keep -X options
Type: enhancement Stage: resolved
Components: Library (Lib) Versions: Python 3.7
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: Nosy List: barry, davin, pitrou, vstinner
Priority: normal Keywords: patch

Created on 2017-11-20 18:18 by pitrou, last changed 2022-04-11 14:58 by admin. This issue is now closed.

Pull Requests
URL Status Linked Edit
PR 4480 merged vstinner, 2017-11-20 20:54
Messages (3)
msg306574 - (view) Author: Antoine Pitrou (pitrou) * (Python committer) Date: 2017-11-20 18:18
`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()
msg306597 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2017-11-20 23:24
New changeset f39b674876d2bd47ec7fc106d673b60ff24092ca by Victor Stinner in branch 'master':
bpo-32094: Update subprocess for -X dev (#4480)
msg306604 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2017-11-21 00:43
Thanks for the bug report Antoine, it's now fixed!
Date User Action Args
2022-04-11 14:58:54adminsetgithub: 76275
2017-11-21 00:43:12vstinnersetstatus: open -> closed
resolution: fixed
messages: + msg306604

stage: patch review -> resolved
2017-11-20 23:24:58vstinnersetmessages: + msg306597
2017-11-20 20:54:57vstinnersetkeywords: + patch
stage: patch review
pull_requests: + pull_request4417
2017-11-20 18:18:46pitroucreate