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.

作者 martin.panter
收信人 abarry, dstufft, eric.araujo, ezio.melotti, martin.panter, paul.moore, r.david.murray, steve.dower, tim.golden, vstinner, zach.ware
日期 2016-05-17.23:07:38
SpamBayes Score -1.0
Marked as misclassified
Message-id <1463526458.46.0.339830331521.issue27048@psf.upfronthosting.co.za>
In-reply-to
内容
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")
历史
日期 用户 动作 参数
2016-05-17 23:07:38martin.panter修改recipients: + 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.panter修改messageid: <1463526458.46.0.339830331521.issue27048@psf.upfronthosting.co.za>
2016-05-17 23:07:38martin.panter链接issue27048 messages
2016-05-17 23:07:38martin.panter创建