[issue6135] subprocess seems to use local encoding and give no choice

Andrew Clegg report at bugs.python.org
Tue Oct 10 10:45:38 EDT 2017


Andrew Clegg <andrew.clegg at durham.ac.uk> added the comment:

The commit for this bug (720f0cf580e2) introduces encoding and errors arguments but doesn't actually document what the values of these should be. In the case of the encoding it could be reasonably guessed, but the only way to determine what the value of 'errors' should be is to make the logical leap and look at the TextIOWrapper doc page.

And in reply to message #274510, there certainly should be a 'text=True' argument added. There are countless use cases where text rather than bytes is the expected behaviour, and currently this has to be triggered by using a more obscure option. In any case, it could be argued that text should be returned when shell=True since this mimics the behaviour of any shell program. 

(Sorry if adding a comment to a closed bug is poor etiquette; it seemed like the best place to put this comment)

----------
nosy: +andrewclegg

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue6135>
_______________________________________


More information about the Python-bugs-list mailing list