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.

Author takluyver
Recipients takluyver
Date 2015-01-28.22:13:38
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1422483218.99.0.771753896574.issue23342@psf.upfronthosting.co.za>
In-reply-to
Content
This follows on from the python-ideas thread starting here: https://mail.python.org/pipermail/python-ideas/2015-January/031479.html

subprocess gains:

- A CompletedProcess class representing a process that has finished, with attributes args, returncode, stdout and stderr
- A run() function which runs a process to completion and returns a CompletedProcess instance, aiming to unify the functionality of call, check_call and check_output
- CalledProcessError and TimeoutExceeded now have a stderr attribute, to avoid throwing away potentially relevant information.

Things I'm not sure about:

1. Should run() capture stdout/stderr by default? I opted not to, for consistency with Popen and with shells.
2. I gave run() a check_returncode parameter, but it feels quite a long name for a parameter. Is 'check' clear enough to use as the parameter name?
3. Popen has an 'args' attribute, while CalledProcessError and TimeoutExpired have 'cmd'. CompletedProcess sits between those cases, so which name should it use? For now, it's args.
History
Date User Action Args
2015-01-28 22:13:39takluyversetrecipients: + takluyver
2015-01-28 22:13:38takluyversetmessageid: <1422483218.99.0.771753896574.issue23342@psf.upfronthosting.co.za>
2015-01-28 22:13:38takluyverlinkissue23342 messages
2015-01-28 22:13:38takluyvercreate