[docs] [issue20344] subprocess.check_output() docs misrepresent what shell=True does

R. David Murray report at bugs.python.org
Fri Mar 21 14:38:22 CET 2014

R. David Murray added the comment:

Thanks Tuomas, but we don't have any consensus that that kind of change will be accepted.  It's just my opinion that it should be...and if it was, it would have to start with a deprecation, not raising an exception.

What we need as a patch for this issue is a documentation patch explaining why using shell=True with a list is a bad idea in the 'frequently used arguments' section.  The paragraph about 'args' in the frequently used arguments section should say something like 'using shell=True with a list containing more than one element does not currently raise an error, but it will not do what you expect; only the first element of the list will be executed on unix, and on windows the quoting is likely to be incorrect.  See the Popen constructor documentation below for a more precise description.'

(You can see why I think this usage should be deprecated, I hope ;)


Python tracker <report at bugs.python.org>

More information about the docs mailing list