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 akira
Recipients akira, juj, vstinner
Date 2014-09-20.00:35:17
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1411173317.9.0.0557618249228.issue22442@psf.upfronthosting.co.za>
In-reply-to
Content
> 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?
History
Date User Action Args
2014-09-20 00:35:17akirasetrecipients: + akira, vstinner, juj
2014-09-20 00:35:17akirasetmessageid: <1411173317.9.0.0557618249228.issue22442@psf.upfronthosting.co.za>
2014-09-20 00:35:17akiralinkissue22442 messages
2014-09-20 00:35:17akiracreate