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
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
Changes by Arfrever Frehtes Taifersar Arahesis arfrever@gmail.com:
--
nosy: +Arfrever
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue8391
___
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
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
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
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
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
___
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
STINNER Victor victor.stin...@haypocalc.com added the comment:
See also issue #4036.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue8391
___
___
STINNER Victor victor.stin...@haypocalc.com added the comment:
See also #8393.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue8391
___
___
11 matches
Mail list logo