[issue8640] subprocess: canonicalize env to bytes on Unix (Python3)

2010-05-18 Thread STINNER Victor
STINNER Victor added the comment: My patch to fix #8513 does also fix the examples of this issue and so I think that the canonicalization is no more needed. I will only reopen the issue if I find a good reason to apply the patch :-) -- resolution: -> fixed status: open -> closed ___

[issue8640] subprocess: canonicalize env to bytes on Unix (Python3)

2010-05-18 Thread STINNER Victor
STINNER Victor added the comment: os.exeve() and os.exevpe() should also canonicalize env to bytes. os.exeve() and os.exevpe(), but not os._exevpe() to avoid doing it twice (once in subprocess, once in os._exevpe). Patch os._exevpe() is not enough because subprocess doesn't call it on Unix if

[issue8640] subprocess: canonicalize env to bytes on Unix (Python3)

2010-05-15 Thread STINNER Victor
STINNER Victor added the comment: Python 3.1 accepts duplicate variables (str name, bytes name). It creates the two variables is a random order: >>> subprocess.call(['env'], env={'xx': 'str', b'xx': 'bytes'}) xx=str xx=bytes 0 >>> subprocess.call(['env'], env={'xxx': 'str', b'xxx': 'bytes'}) x

[issue8640] subprocess: canonicalize env to bytes on Unix (Python3)

2010-05-15 Thread STINNER Victor
STINNER Victor added the comment: pitou> Why wouldn't you give byte variables in env too? Ok, attached patch canonicalize env keys and values to bytes. If a variable is defined twice (str name, bytes name), a ValueError is raised. The patch depends on #8513: it requires that os.get_exec_path(