[Python-ideas] Adding a subprocess.CompletedProcess class

Ethan Furman ethan at stoneleaf.us
Wed Jan 28 21:35:05 CET 2015

On 01/28/2015 12:27 PM, Thomas Kluyver wrote:
> On 28 January 2015 at 10:02, Ethan Furman <ethan at stoneleaf.us <mailto:ethan at stoneleaf.us>> wrote:
>     > It seems like there's some level of interest in this; shall I work on a patch?
>     That would be great!
> First pass at a patch attached. I also ended up adding stderr attributes to CalledProcessError and TimeoutExceeded, so
> information is not thrown away.
> Things I wasn't sure about:
> 1. Should stdout/stderr be captured 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.

At this point, create an issue on the bug tracker and attach your patch there.  Much easier to keep track of that way.


-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: OpenPGP digital signature
URL: <http://mail.python.org/pipermail/python-ideas/attachments/20150128/0021be11/attachment.sig>

More information about the Python-ideas mailing list