Message227138
> This is a documented failure on the python subprocess page,
> but why not just fix it up directly in python itself?
If you want to discard the output; you could use:
check_call(args, stdin=DEVNULL, stdout=DEVNULL, stderr=STDOUT)
check_call() passes its parameters to Popen() as is.
The only parameter it knows about is args that is used to raise
an exception.
Do you want check_call() to inspect the parameters and to do
something about stdout=PIPE, stderr=PIPE?
Where "something" could be:
- nothing -- the current behavior: everything works until the child
process produces enough output to fill any of OS pipe buffers as documented
- call proc.communicate() -- store (unlimited) output in memory instead of
just hanging: everything works slowly until the system runs out of memory
- replace with DEVNULL -- "do what I mean" behavior: inconsistent with the
direct Popen() call
- raise ValueError with informative error message (about DEVNULL option)
after issueing a DeprecationWarning for a release: it fixes this particular
misuse of check_call(). Are there other common "wrong in every case"
check_call() parameters? |
|
Date |
User |
Action |
Args |
2014-09-20 00:35:17 | akira | set | recipients:
+ akira, vstinner, juj |
2014-09-20 00:35:17 | akira | set | messageid: <1411173317.9.0.0557618249228.issue22442@psf.upfronthosting.co.za> |
2014-09-20 00:35:17 | akira | link | issue22442 messages |
2014-09-20 00:35:17 | akira | create | |
|