◐ Shell
clean mode source ↗

Message 105843 - Python tracker

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' key, but raise a ValueError if both keys exist
 - add os.supports_bytes_environ flag (boolean)
 - os._execvpe() and subprocess._execute_child() canonicalize the program to bytes
 - test "not path.supports_unicode_filenames" to check if fsencode() should be defined and used (instead of testing name != "nt")

I'm not proud of the change on os.get_exec_path() result type, I'm not sure that it's the right thing to do. But at least, the patch works :-)