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

2010-04-25 Thread STINNER Victor
STINNER Victor victor.stin...@haypocalc.com 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

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

2010-04-23 Thread STINNER Victor
STINNER Victor victor.stin...@haypocalc.com 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 arfrever@gmail.com: -- nosy: +Arfrever ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8391 ___

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

2010-04-17 Thread STINNER Victor
STINNER Victor victor.stin...@haypocalc.com 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

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

2010-04-15 Thread STINNER Victor
STINNER Victor victor.stin...@haypocalc.com 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 rep...@bugs.python.org

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

2010-04-15 Thread STINNER Victor
STINNER Victor victor.stin...@haypocalc.com 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

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

2010-04-15 Thread STINNER Victor
STINNER Victor victor.stin...@haypocalc.com 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

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

2010-04-15 Thread STINNER Victor
Changes by STINNER Victor victor.stin...@haypocalc.com: Removed file: http://bugs.python.org/file16918/os_execvpe_surrogates.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8391 ___

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

2010-04-13 Thread STINNER Victor
New submission from STINNER Victor victor.stin...@haypocalc.com: 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

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

2010-04-13 Thread STINNER Victor
STINNER Victor victor.stin...@haypocalc.com added the comment: See also issue #4036. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8391 ___ ___

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

2010-04-13 Thread STINNER Victor
STINNER Victor victor.stin...@haypocalc.com added the comment: See also #8393. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8391 ___ ___