[issue27048] Breakages in subprocess.Popen with non-ascii characters in environment

2016-05-17 Thread Martin Panter
Martin Panter added the comment: 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/_

[issue27048] Breakages in subprocess.Popen with non-ascii characters in environment

2016-05-17 Thread STINNER Victor
STINNER Victor added the comment: Python 3.4 has a similar function: query_vcvarsall() in Lib/distutils/msvc9compiler.py. -- ___ Python tracker ___ _

[issue27048] Breakages in subprocess.Popen with non-ascii characters in environment

2016-05-17 Thread STINNER Victor
STINNER Victor added the comment: > The module distutils._msvccompiler doesn't exist in Python 3.5. Oops, I mean: it *only* exists in Python 3.5 (and newer, it doesn't exist in Python 3.4). -- ___ Python tracker

[issue27048] Breakages in subprocess.Popen with non-ascii characters in environment

2016-05-17 Thread STINNER Victor
STINNER Victor added the comment: > File "E:\Python\3.5.0\lib\distutils\_msvccompiler.py", line 92, in > _get_vc_env >universal_newlines=True, This function was added in Python 3.5 by the issue #23970: "Adds distutils._msvccompiler for new Visual Studio versions." (VS 2015, I guess). The

[issue27048] Breakages in subprocess.Popen with non-ascii characters in environment

2016-05-17 Thread STINNER Victor
Changes by STINNER Victor : -- components: +Distutils, Windows nosy: +dstufft, eric.araujo, paul.moore, steve.dower, tim.golden, zach.ware versions: +Python 3.5 ___ Python tracker __

[issue27048] Breakages in subprocess.Popen with non-ascii characters in environment

2016-05-17 Thread STINNER Victor
STINNER Victor added the comment: Copy of https://gist.github.com/Vgr255/67fc0245056454d6a68608790a9d417b E:\LGP_Test\LGP-0.1>py setup.py install running install running build running build_ext building 'lgp' extension Traceback (most recent call last): File "setup.py", line 10, in Extens

[issue27048] Breakages in subprocess.Popen with non-ascii characters in environment

2016-05-17 Thread Emanuel Barry
Emanuel Barry added the comment: Oops, I thought I had written that - must have accidentally deleted it. I'm on Windows 7, my locale is fr-CA / cp1252, and the non-ascii data (my name =) comes from my environment. I discussed a bit with R. David Murray off-issue, and in the end it seems that

[issue27048] Breakages in subprocess.Popen with non-ascii characters in environment

2016-05-17 Thread STINNER Victor
STINNER Victor added the comment: Hi, > I got a random UnicodeDecodeError while trying to install a module with > distutils. Please provide more context to your issue: * What is your operating system? * What is your locale? (locale encoding on UNIX, ANSI and OEM code pages on Windows) * Wher

[issue27048] Breakages in subprocess.Popen with non-ascii characters in environment

2016-05-17 Thread Emanuel Barry
Emanuel Barry added the comment: The data that causes the issue is my name (Émanuel), which is present in a couple of places in my environment. I also completely forgot about surrogateescape, my bad. Here are two new patches with the surrogateescape error handler instead of the replace one. -

[issue27048] Breakages in subprocess.Popen with non-ascii characters in environment

2016-05-17 Thread Emanuel Barry
Changes by Emanuel Barry : Added file: http://bugs.python.org/file42883/subprocess_distutils_errors_2.patch ___ Python tracker ___ ___ Python-

[issue27048] Breakages in subprocess.Popen with non-ascii characters in environment

2016-05-17 Thread R. David Murray
R. David Murray added the comment: I would not think errors=replace would be the right answer...that would lose information, wouldn't it? What is the data being used for that causes the problem? Normally in situations like this we'd use surrogateescape at the system boundary, but I don't kno

[issue27048] Breakages in subprocess.Popen with non-ascii characters in environment

2016-05-17 Thread Emanuel Barry
Changes by Emanuel Barry : Added file: http://bugs.python.org/file42881/subprocess_distutils_errors_1.patch ___ Python tracker ___ ___ Python-

[issue27048] Breakages in subprocess.Popen with non-ascii characters in environment

2016-05-17 Thread Emanuel Barry
New submission from Emanuel Barry: I got a random UnicodeDecodeError while trying to install a module with distutils. Traced it back and it being my name having a non-ascii character floating around in my environment. I'm including two patches: subprocess_errors_simple_1.patch simply adds 'er