[issue8513] subprocess: support bytes program name (POSIX)

2011-03-03 Thread STINNER Victor
STINNER Victor victor.stin...@haypocalc.com added the comment: Oh, I forget subprocess.call(b'ls'): command as a byte string = fixed in Python 3.3 (r88720). -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8513

[issue8513] subprocess: support bytes program name (POSIX)

2010-05-18 Thread STINNER Victor
STINNER Victor victor.stin...@haypocalc.com added the comment: Hum, os.get_exec_path() has no test for the new features (support b'PATH' key and bytes value). -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8513

[issue8513] subprocess: support bytes program name (POSIX)

2010-05-18 Thread STINNER Victor
STINNER Victor victor.stin...@haypocalc.com added the comment: Fixed by r81291 + r81292 (py3k). The final commit contains much more tests ;-) I will watch the buildbot next hours and block the commit in 3.1. -- resolution: - fixed status: open - closed

[issue8513] subprocess: support bytes program name (POSIX)

2010-05-16 Thread STINNER Victor
STINNER Victor victor.stin...@haypocalc.com added the comment: Oops, I forgot to add the new patch: subprocess_bytes_program-3.patch. -- Added file: http://bugs.python.org/file17372/subprocess_bytes_program-3.patch ___ Python tracker

[issue8513] subprocess: support bytes program name (POSIX)

2010-05-16 Thread STINNER Victor
STINNER Victor victor.stin...@haypocalc.com added the comment: I asked on #python-dev about os.get_exec_path() result type. As expected, the answer was It's a really bad idea. So here is a new version of my patch. Summary of the patch version 4: - subprocess.Popen() and os._execvpe() support

[issue8513] subprocess: support bytes program name (POSIX)

2010-05-16 Thread STINNER Victor
Changes by STINNER Victor victor.stin...@haypocalc.com: Removed file: http://bugs.python.org/file17372/subprocess_bytes_program-3.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8513 ___

[issue8513] subprocess: support bytes program name (POSIX)

2010-05-16 Thread STINNER Victor
STINNER Victor victor.stin...@haypocalc.com added the comment: I forgot to update test_os: patch version 5. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8513 ___

[issue8513] subprocess: support bytes program name (POSIX)

2010-05-16 Thread STINNER Victor
Changes by STINNER Victor victor.stin...@haypocalc.com: Added file: http://bugs.python.org/file17378/subprocess_bytes_program-4.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8513 ___

[issue8513] subprocess: support bytes program name (POSIX)

2010-05-16 Thread STINNER Victor
Changes by STINNER Victor victor.stin...@haypocalc.com: Removed file: http://bugs.python.org/file17376/subprocess_bytes_program-4.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8513 ___

[issue8513] subprocess: support bytes program name (POSIX)

2010-05-16 Thread STINNER Victor
Changes by STINNER Victor victor.stin...@haypocalc.com: Removed file: http://bugs.python.org/file17240/issue8513_partA.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8513 ___

[issue8513] subprocess: support bytes program name (POSIX)

2010-05-16 Thread STINNER Victor
Changes by STINNER Victor victor.stin...@haypocalc.com: Removed file: http://bugs.python.org/file17261/issue8513_partA-fsencode.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8513 ___

[issue8513] subprocess: support bytes program name (POSIX)

2010-05-16 Thread STINNER Victor
Changes by STINNER Victor victor.stin...@haypocalc.com: Removed file: http://bugs.python.org/file17378/subprocess_bytes_program-4.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8513 ___

[issue8513] subprocess: support bytes program name (POSIX)

2010-05-16 Thread STINNER Victor
Changes by STINNER Victor victor.stin...@haypocalc.com: Added file: http://bugs.python.org/file17379/subprocess_bytes_program-5.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8513 ___

[issue8513] subprocess: support bytes program name (POSIX)

2010-05-16 Thread STINNER Victor
STINNER Victor victor.stin...@haypocalc.com added the comment: Ok, everything is ready for this issue: os.environb and os.fsencode() are commited, and test_os is prepared to test os._execvpe() change. I'm just waiting for a review. Execpt the change on os.get_exec_path(), the patch is now

[issue8513] subprocess: support bytes program name (POSIX)

2010-05-15 Thread STINNER Victor
STINNER Victor victor.stin...@haypocalc.com added the comment: New patch fixing this issue: - os.get_exec_path() type now depends on the OS: str on Windows, bytes on Unix - os.get_exec_path(None) uses os.environ on Windows, os.environb on Unix - os.get_exec_path(env) uses 'PATH' or b'PATH'

[issue8513] subprocess: support bytes program name (POSIX)

2010-05-08 Thread STINNER Victor
STINNER Victor victor.stin...@haypocalc.com added the comment: I think your partA patch makes sense. I can fix part A and B in two commits. It would benefit from fsencode/fsdecode functions rather than manually doing the 'surrogateescape' thing everywhere. I choosed to drop the idea of

[issue8513] subprocess: support bytes program name (POSIX)

2010-05-08 Thread STINNER Victor
STINNER Victor victor.stin...@haypocalc.com added the comment: Update the patch to use os.fsencode(). -- Added file: http://bugs.python.org/file17261/issue8513_partA-fsencode.patch ___ Python tracker rep...@bugs.python.org

[issue8513] subprocess: support bytes program name (POSIX)

2010-05-08 Thread Gregory P. Smith
Gregory P. Smith g...@krypto.org added the comment: Build on the os._execvpe unittest I added in py3k r81001. Protected functions are perfectly fine things to unittest. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8513

[issue8513] subprocess: support bytes program name (POSIX)

2010-05-08 Thread STINNER Victor
STINNER Victor victor.stin...@haypocalc.com added the comment: Build on the os._execvpe unittest I added in py3k r81001. The test fails on Windows. == FAIL: test_internal_execvpe (test.test_os.ExecTests)

[issue8513] subprocess: support bytes program name (POSIX)

2010-05-08 Thread Gregory P. Smith
Gregory P. Smith g...@krypto.org added the comment: my bad. hopefully r81019 fixes that. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8513 ___

[issue8513] subprocess: support bytes program name (POSIX)

2010-05-07 Thread Gregory P. Smith
Gregory P. Smith g...@krypto.org added the comment: I think your partA patch makes sense. It would benefit from fsencode/fsdecode functions rather than manually doing the 'surrogateescape' thing everywhere. Also, could you add a unittest for os._execvpe to test its behavior? --

[issue8513] subprocess: support bytes program name (POSIX)

2010-05-06 Thread STINNER Victor
Changes by STINNER Victor victor.stin...@haypocalc.com: Added file: http://bugs.python.org/file17240/issue8513_partA.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8513 ___

[issue8513] subprocess: support bytes program name (POSIX)

2010-05-06 Thread STINNER Victor
STINNER Victor victor.stin...@haypocalc.com added the comment: New patch (issue8513_partA.patch): - don't *decode*, only encode (str-bytes) - only patch os._execvpe() for POSIX -- ___ Python tracker rep...@bugs.python.org

[issue8513] subprocess: support bytes program name (POSIX)

2010-05-06 Thread STINNER Victor
STINNER Victor victor.stin...@haypocalc.com added the comment: If the creation of os.environb is accepted (#8603), I think that subprocess should also be modified to support pure bytes environ. I fixed #8603 and opened #8640 for subprocess and envb. --

[issue8513] subprocess: support bytes program name (POSIX)

2010-05-06 Thread STINNER Victor
Changes by STINNER Victor victor.stin...@haypocalc.com: -- dependencies: +Create fsencode() and fsdecode() functions in os.path ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8513 ___

[issue8513] subprocess: support bytes program name (POSIX)

2010-05-04 Thread STINNER Victor
STINNER Victor victor.stin...@haypocalc.com added the comment: Bytes program name problem should be splitted in two parts: (a) subprocess.call([b'env']) and subprocess.call([b'env'], env={'PATH': '/usr/bin'}): bytes program and unicode environ (b) bytes program and bytes environ Part (a)

[issue8513] subprocess: support bytes program name (POSIX)

2010-04-30 Thread STINNER Victor
Changes by STINNER Victor victor.stin...@haypocalc.com: -- title: subprocess: support bytes program name - subprocess: support bytes program name (POSIX) ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8513

[issue8513] subprocess: support bytes program name

2010-04-26 Thread STINNER Victor
STINNER Victor victor.stin...@haypocalc.com added the comment: My patch changes: * os._execvpe(): support bytes type for the file argument (program name) * os.get_exec_path(): support bytes type for the PATH environment variable * Popen._execute_child(): decode the executable name before

[issue8513] subprocess: support bytes program name

2010-04-24 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/issue8513 ___

[issue8513] subprocess: support bytes program name

2010-04-23 Thread STINNER Victor
New submission from STINNER Victor victor.stin...@haypocalc.com: While fixing #8391, I realized that subprocess doesn't support bytes program name if it's not an absolute path: --- $ ./python import subprocess subprocess.call([b'echo']) Traceback (most recent call last): File stdin,

[issue8513] subprocess: support bytes program name

2010-04-23 Thread Gregory P. Smith
Changes by Gregory P. Smith g...@krypto.org: -- nosy: +gregory.p.smith ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8513 ___ ___ Python-bugs-list

[issue8513] subprocess: support bytes program name

2010-04-23 Thread STINNER Victor
STINNER Victor victor.stin...@haypocalc.com added the comment: Attached patch (draft version) fixes this issue. -- keywords: +patch Added file: http://bugs.python.org/file17060/subprocess_bytes_program.patch ___ Python tracker rep...@bugs.python.org

[issue8513] subprocess: support bytes program name

2010-04-23 Thread STINNER Victor
STINNER Victor victor.stin...@haypocalc.com added the comment: I proposed the creation of fs_encode() and fs_decode() functions in os.path: see #8514. There functions would simplify my patch, but also make it correct on all OS (Windows, Mac, Linux). -- dependencies: +Create