Nick Coghlan added the comment:

Since this issue was first filed, the "opener" parameter was added to the 
open() builtin: https://docs.python.org/3/library/functions.html#open

I mention that, as the problem there is similar to the problem here: wanting to 
construct a buffered text-mode interface, but with a different stream at the 
lowest layer (whatever "opener" returns for the builtin open(), the implicitly 
created pipes for the subprocess module).

To answer Martin's question about "Why not just wrap things manually?", the 
main issue with that is that it doesn't work for the check_output helper 
function - to get text out of that, currently your only option is to enable 
universal newlines and trust that the output is encoded as UTF-8 (which is 
fortunately often a valid assumption on modern systems).

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue6135>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to