Martin Panter added the comment:

I think it is conceivable that people could use Readline _and_ do their own 
stuff with the terminal. Consider someone playing with terminal stuff in the 
interactive interpreter (which happens to use Readline). I understand Readline 
returns the terminal to a sensible state after it returns you a line.

Another concern with the patch is that signal.getsignal(SIGWINCH) returns 
SIG_DFL, although according to the documentation it should probably return None 
(meaning a signal handler was not installed by Python). Not sure if that is a 
bug with the patch or with the signal module though :)

Also it looks like this patch will fail with Editline (Gnu Readline substitute 
used on OS X), and therefore probably also older versions of Gnu Readline. With 
my patch from Issue 13501 to enable Editline on Linux, I get these errors:

/media/disk/home/proj/python/cpython/Modules/readline.c: In function 
‘readline_until_enter_or_signal’:
/media/disk/home/proj/python/cpython/Modules/readline.c:1116:17: warning: 
implicit declaration of function ‘rl_resize_terminal’ 
[-Wimplicit-function-declaration]
                 rl_resize_terminal();
                 ^
*** WARNING: renaming "readline" since importing it failed: 
build/lib.linux-x86_64-3.6-pydebug/readline.cpython-36dm-x86_64-linux-gnu.so: 
undefined symbol: rl_resize_terminal

Following modules built successfully but were removed because they could not be 
imported:
readline

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue23735>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to