Skip to content

bpo-32094: Update subprocess for -X dev#4480

Merged
vstinner merged 2 commits into
python:masterfrom
vstinner:xdev_args
Nov 20, 2017
Merged

bpo-32094: Update subprocess for -X dev#4480
vstinner merged 2 commits into
python:masterfrom
vstinner:xdev_args

Conversation

@vstinner
Copy link
Copy Markdown
Member

@vstinner vstinner commented Nov 20, 2017

Modify subprocess._args_from_interpreter_flags() to handle -X dev
option.

Add also unit tests for test.support.args_from_interpreter_flags()
and test.support.optim_args_from_interpreter_flags().

https://bugs.python.org/issue32094

Modify subprocess._args_from_interpreter_flags() to handle -X dev
option.

Add also unit tests for test.support.args_from_interpreter_flags()
and test.support.optim_args_from_interpreter_flags().
Comment thread Lib/subprocess.py Outdated
args.append('-' + opt * v)
for opt in sys.warnoptions:

if hasattr(sys, '_xoptions'):
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we want to add other -X options, such as -Xfaulthandler?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure! Done.

Comment thread Lib/subprocess.py
if value is True:
arg = opt
else:
arg = '%s=%s' % (opt, value)
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you want to use a pretty f-string here?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nope, I prefer to use str % args here :-) Don't ask me why, I have no rationale for such coding style choice :-)

@vstinner vstinner merged commit f39b674 into python:master Nov 20, 2017
@vstinner vstinner deleted the xdev_args branch November 20, 2017 23:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants