Author ncoghlan
Recipients Arfrever, amaury.forgeotdarc, berwin22, chris.jerdonek, eric.araujo, mark, martin.panter, mightyiam, ncoghlan, pitrou, r.david.murray, segfaulthunter, srid, vstinner
Date 2016-05-18.06:08:56
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1463551736.76.0.456870656666.issue6135@psf.upfronthosting.co.za>
In-reply-to
Content
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).
History
Date User Action Args
2016-05-18 06:08:56ncoghlansetrecipients: + ncoghlan, amaury.forgeotdarc, pitrou, vstinner, mark, eric.araujo, segfaulthunter, Arfrever, r.david.murray, srid, mightyiam, chris.jerdonek, martin.panter, berwin22
2016-05-18 06:08:56ncoghlansetmessageid: <1463551736.76.0.456870656666.issue6135@psf.upfronthosting.co.za>
2016-05-18 06:08:56ncoghlanlinkissue6135 messages
2016-05-18 06:08:56ncoghlancreate