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 martin.panter
Recipients abarry, dstufft, eric.araujo, ezio.melotti, martin.panter, paul.moore, r.david.murray, steve.dower, tim.golden, vstinner, zach.ware
Date 2016-05-17.23:07:38
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1463526458.46.0.339830331521.issue27048@psf.upfronthosting.co.za>
In-reply-to
Content
IMO adding a Popen(errors=...) parameter would be a new feature for 3.6+ only. Also, the patch does not take the error handler into account when encoding and decoding multiple PIPEs in communicate().

I think it would be better to fix this bug in Lib/distutils/_msvccompiler.py only. The equivalent bug fix would look like:

out = subprocess.check_output(
    ...,
    stderr=subprocess.STDOUT,
    # No universal_newlines!
)
...
out = io.TextIOWrapper(io.BytesIO(out), errors="surrogateescape").read()

Or maybe a simpler version is sufficient: (I’m not familiar enough with the use case or Windows to say.)

out = out.decode("ascii", "surrogateescape")
History
Date User Action Args
2016-05-17 23:07:38martin.pantersetrecipients: + martin.panter, paul.moore, vstinner, tim.golden, ezio.melotti, eric.araujo, r.david.murray, zach.ware, steve.dower, dstufft, abarry
2016-05-17 23:07:38martin.pantersetmessageid: <1463526458.46.0.339830331521.issue27048@psf.upfronthosting.co.za>
2016-05-17 23:07:38martin.panterlinkissue27048 messages
2016-05-17 23:07:38martin.pantercreate