[issue23792] help crash leaves terminal in raw mode

2015-03-30 Thread R. David Murray
R. David Murray added the comment: Yeah, someone could theoretically manage to hit ctl-c between the time the process is started and the call to pipe.write, or between it and the call to wait, but I don't think those very-low-probability events are worth worrying about. -- __

[issue23792] help crash leaves terminal in raw mode

2015-03-30 Thread Roundup Robot
Roundup Robot added the comment: New changeset 7a5f30babc72 by R David Murray in branch '3.4': #23792: also catch interrupt around pipe.write. https://hg.python.org/cpython/rev/7a5f30babc72 New changeset 536c4f4acae1 by R David Murray in branch 'default': Merge: #23792: also catch interrupt arou

[issue23792] help crash leaves terminal in raw mode

2015-03-29 Thread Martin Panter
Martin Panter added the comment: I think your patch should be fine for all practical cases I can think of. -- ___ Python tracker ___ _

[issue23792] help crash leaves terminal in raw mode

2015-03-29 Thread R. David Murray
R. David Murray added the comment: Here is a version that keeps things clean by not diplaying the traceback. The ctl-c does have an effect, but not a visible one unless one pays careful attention :) -- Added file: http://bugs.python.org/file38731/catch_additional_interrupt.patch

[issue23792] help crash leaves terminal in raw mode

2015-03-29 Thread Martin Panter
Martin Panter added the comment: I don’t think SIGQUIT handling is a big problem. But even with the new change, it is still easy to screw up the terminal in many cases, so I wouldn’t say this is fixed yet. Steps for Python 3 in a small 80 × 25 terminal on Linux: * import _pyio; help(_pyio) * H

[issue23792] help crash leaves terminal in raw mode

2015-03-29 Thread R. David Murray
R. David Murray added the comment: I've committed the fix. If someone wants to argue in favor of also handling SIGQUIT, they can open a new issue. -- resolution: -> fixed stage: commit review -> resolved status: open -> closed ___ Python tracker <

[issue23792] help crash leaves terminal in raw mode

2015-03-29 Thread Roundup Robot
Roundup Robot added the comment: New changeset 77c04e949b4b by R David Murray in branch '3.4': #23792: Ignore KeyboardInterrupt when the pydoc pager is active. https://hg.python.org/cpython/rev/77c04e949b4b New changeset fe0c830b43bb by R David Murray in branch 'default': Merge: #23792: Ignore K

[issue23792] help crash leaves terminal in raw mode

2015-03-28 Thread R. David Murray
R. David Murray added the comment: SIGINT *is* keyboard interrupt. Since less at least seems to ignore SIGQUIT I suppose also ignoring that would be reasonable, since the user (should) by analogy expect that behavior while the pager is active. Note, however, that the signals we are ignoring

[issue23792] help crash leaves terminal in raw mode

2015-03-27 Thread Martin Panter
Martin Panter added the comment: I suspect you also need ignore signals while piping data to the child process. Similar to how the POSIX system() call ignores SIGINT and SIGQUIT soon after spawning the child, until after the child has exited. Try with a large help text on Linux, like import _

[issue23792] help crash leaves terminal in raw mode

2015-03-27 Thread R. David Murray
Changes by R. David Murray : -- stage: patch review -> commit review ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscr

[issue23792] help crash leaves terminal in raw mode

2015-03-27 Thread R. David Murray
R. David Murray added the comment: Updated patch. -- Added file: http://bugs.python.org/file38715/keyboardinterrupt_in_pydoc_pager.patch ___ Python tracker ___ _

[issue23792] help crash leaves terminal in raw mode

2015-03-27 Thread R. David Murray
R. David Murray added the comment: The print of KeyboardInterrupt whould be dropped. less itself does nothing if you press ctl-c, and the pager is used when pydoc is called from the shell command line, and printing KeyboardInterrupt there just looks wrong. --

[issue23792] help crash leaves terminal in raw mode

2015-03-27 Thread Ezio Melotti
Ezio Melotti added the comment: Patch WFM too. -- stage: -> patch review ___ Python tracker ___ ___ Python-bugs-list mailing list Uns

[issue23792] help crash leaves terminal in raw mode

2015-03-27 Thread R. David Murray
R. David Murray added the comment: The attached patch fixes the issue for me. -- keywords: +patch Added file: http://bugs.python.org/file38714/keyboardinterrupt_in_pydoc_pager.patch ___ Python tracker

[issue23792] help crash leaves terminal in raw mode

2015-03-27 Thread R. David Murray
R. David Murray added the comment: I do see the anomalous behavior inside python, but on my gentoo system when I exit python the terminal is fine. -- ___ Python tracker ___

[issue23792] help crash leaves terminal in raw mode

2015-03-27 Thread Berker Peksag
Berker Peksag added the comment: This looks like a duplicate of issue 21398. I can reproduce it with Python 3.4.1 (compiled myself) on Ubuntu 12.04. >>> help(str) Ctrl-C :Traceback (most recent call last): File "", line 1, in File "/usr/local/lib/python3.4/_sitebuiltins.py", line 103, in

[issue23792] help crash leaves terminal in raw mode

2015-03-27 Thread Ezio Melotti
Ezio Melotti added the comment: I can reproduce on Python 3 on Ubuntu 14.10. When I hit Ctrl+C I get: >>> help(range) ... | __hash__(self, /) | Return hash(self). | :Traceback (most recent call last): File "", line 1, in File "/home/wolf/dev/py/py3k/Lib/_sitebuiltins.py", line 103

[issue23792] help crash leaves terminal in raw mode

2015-03-27 Thread R. David Murray
R. David Murray added the comment: I can't reproduce this. Maybe it is a debian bug? -- nosy: +r.david.murray ___ Python tracker ___

[issue23792] help crash leaves terminal in raw mode

2015-03-27 Thread Rusi
New submission from Rusi: Start python3.4 Do help(something) which invokes the pager Ctrl-C A backtrace results and after that the terminal is in raw mode even after exiting python [python 3.4 under debian testing with xfce4] -- components: IDLE messages: 239417 nosy: RusiMody priority