[issue25789] py launcher stderr is not piped to subprocess.Popen.stderr

2015-12-26 Thread Roundup Robot
Roundup Robot added the comment: New changeset d0a84d0c5ceb by Vinay Sajip in branch 'default': Closes #25789: Improved buffering behaviour in launcher. https://hg.python.org/cpython/rev/d0a84d0c5ceb -- nosy: +python-dev resolution: -> fixed stage: patch review -> resolved status: open

[issue25789] py launcher stderr is not piped to subprocess.Popen.stderr

2015-12-04 Thread Eryk Sun
Eryk Sun added the comment: Patch 2 additionally modifies run_child to call exit() instead of ExitProcess. For example: >>> import os, subprocess >>> os.environ['PYLAUNCH_DEBUG'] = '1' >>> p = subprocess.Popen(r'py -3 -c ""', stderr=subprocess.PIPE, stdout=subprocess.PIPE) >>>

[issue25789] py launcher stderr is not piped to subprocess.Popen.stderr

2015-12-04 Thread Steve Dower
Steve Dower added the comment: ExitProcess is a system API and exit is the C runtime API. The C runtime is doing the buffering, so the system doesn't know about it and can't flush if you terminate through that API. The exit function should, or we could explicitly flush the buffer after writing

[issue25789] py launcher stderr is not piped to subprocess.Popen.stderr

2015-12-04 Thread Vinay Sajip
Changes by Vinay Sajip : -- nosy: +vinay.sajip ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.pyt

[issue25789] py launcher stderr is not piped to subprocess.Popen.stderr

2015-12-04 Thread Wolfgang Maier
Wolfgang Maier added the comment: > The error() function in PC/launcher.c should call exit(rc) instead of > ExitProcess(rc). This allows the CRT to terminate properly and flush the > stderr FILE stream. Interesting. Why do you need to flush stderr? I would have expected it to be unbuffered in

[issue25789] py launcher stderr is not piped to subprocess.Popen.stderr

2015-12-03 Thread Eryk Sun
Eryk Sun added the comment: The error() function in PC/launcher.c should call exit(rc) instead of ExitProcess(rc). This allows the CRT to terminate properly and flush the stderr FILE stream. With this change it works as expected: >>> import subprocess >>> p = subprocess.Popen(r'amd64\p

[issue25789] py launcher stderr is not piped to subprocess.Popen.stderr

2015-12-03 Thread Wolfgang Maier
New submission from Wolfgang Maier: from the console: > py -3.7 or any other not installed Python version gives: Requested Python version (3.7) not installed However, when the launcher is executed from python via subprocess.Popen: >>>import subprocess >>>p=subprocess.Popen(['py', '-3.7'], st