[issue8391] os.execvpe() doesn't support surrogates in env

2010-04-25 Thread STINNER Victor
STINNER Victor added the comment: I blocked the fix in Python 3.1 because it's non trivial and I prefer to avoid complex changes in Python 3.1. But then I realized that Python 3.1 has two bugs about environment variables. It uses sys.getfilesystemencoding()+surrogateecape to decode variables

[issue8391] os.execvpe() doesn't support surrogates in env

2010-04-23 Thread STINNER Victor
STINNER Victor added the comment: Commited: r80421 (py3k), blocked in 3.1 (80422). The commit fixes also os.getenv() to support bytes environment name. -- resolution: -> fixed status: open -> closed ___ Python tracker

[issue8391] os.execvpe() doesn't support surrogates in env

2010-04-18 Thread Arfrever Frehtes Taifersar Arahesis
Changes by Arfrever Frehtes Taifersar Arahesis : -- nosy: +Arfrever ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscrib

[issue8391] os.execvpe() doesn't support surrogates in env

2010-04-17 Thread STINNER Victor
STINNER Victor added the comment: Current code of execve() has a bug: it uses the length of the environment variable value in *characters* and not in *bytes* to allocate the "p" buffer. I remember that someone wrote a comment somewhere about that... The result is that the environment variable

[issue8391] os.execvpe() doesn't support surrogates in env

2010-04-15 Thread STINNER Victor
Changes by STINNER Victor : Removed file: http://bugs.python.org/file16918/os_execvpe_surrogates.patch ___ Python tracker ___ ___ Python-bugs-l

[issue8391] os.execvpe() doesn't support surrogates in env

2010-04-15 Thread STINNER Victor
STINNER Victor added the comment: New version of the patch: - factorize code between execve(), spawnve() and spawnvpe() - support also surrogates in environment variable names - support bytes and bytearray (bytearray cannot be used as a dictionary key, but my patch supports it) - remove unr

[issue8391] os.execvpe() doesn't support surrogates in env

2010-04-15 Thread STINNER Victor
STINNER Victor added the comment: Other notes: Environment variable *names* use also surrogateescape "encoding". os.spawnve() and os.spawnvpe() should also be patched (the code should also be factorized). -- ___ Python tracker

[issue8391] os.execvpe() doesn't support surrogates in env

2010-04-15 Thread STINNER Victor
STINNER Victor added the comment: My patch doesn't work for types bytes and bytearray. I noticed that py3k uses surrogateescape to encode environment variable values ;-) -- ___ Python tracker

[issue8391] os.execvpe() doesn't support surrogates in env

2010-04-13 Thread STINNER Victor
STINNER Victor added the comment: See also #8393. -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mai

[issue8391] os.execvpe() doesn't support surrogates in env

2010-04-13 Thread STINNER Victor
STINNER Victor added the comment: See also issue #4036. -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http

[issue8391] os.execvpe() doesn't support surrogates in env

2010-04-13 Thread STINNER Victor
New submission from STINNER Victor : It would be nice to support the PEP 383 (surrogateescape) for environment variables in os.execvpe(). Attached patch uses PyUnicode_AsEncodedString(val, Py_FileSystemDefaultEncoding, "surrogateescape") to encode an environment variable value. I'm not sure t