消息 [265788]
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:38 | martin.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:38 | martin.panter | 修改 | messageid: <1463526458.46.0.339830331521.issue27048@psf.upfronthosting.co.za> |
| 2016-05-17 23:07:38 | martin.panter | 链接 | issue27048 messages |
| 2016-05-17 23:07:38 | martin.panter | 创建 | |
|