File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -111,7 +111,7 @@ def test_nonascii_history(self):
111111
112112class TestReadline (unittest .TestCase ):
113113
114- @unittest .skipIf (readline ._READLINE_VERSION < 0x0600 and not is_editline ,
114+ @unittest .skipIf (readline ._READLINE_VERSION < 0x0601 and not is_editline ,
115115 "not supported in this library version" )
116116 def test_init (self ):
117117 # Issue #19884: Ensure that the ANSI sequence "\033[1034h" is not
Original file line number Diff line number Diff line change @@ -46,6 +46,8 @@ Core and Builtins
4646Library
4747-------
4848
49+ - Issue #19884: Avoid spurious output on OS X with Gnu Readline.
50+
4951- Issue #10513: Fix a regression in Connection.commit(). Statements should
5052 not be reset after a commit.
5153
Original file line number Diff line number Diff line change @@ -1146,19 +1146,22 @@ setup_readline(readlinestate *mod_state)
11461146 mod_state -> begidx = PyLong_FromLong (0L );
11471147 mod_state -> endidx = PyLong_FromLong (0L );
11481148
1149- #ifndef __APPLE__
1150- if (!isatty (STDOUT_FILENO )) {
1151- /* Issue #19884: stdout is not a terminal. Disable meta modifier
1152- keys to not write the ANSI sequence "\033[1034h" into stdout. On
1153- terminals supporting 8 bit characters like TERM=xterm-256color
1154- (which is now the default Fedora since Fedora 18), the meta key is
1155- used to enable support of 8 bit characters (ANSI sequence
1156- "\033[1034h").
1157-
1158- With libedit, this call makes readline() crash. */
1159- rl_variable_bind ("enable-meta-key" , "off" );
1160- }
1149+ #ifdef __APPLE__
1150+ if (!using_libedit_emulation )
11611151#endif
1152+ {
1153+ if (!isatty (STDOUT_FILENO )) {
1154+ /* Issue #19884: stdout is not a terminal. Disable meta modifier
1155+ keys to not write the ANSI sequence "\033[1034h" into stdout. On
1156+ terminals supporting 8 bit characters like TERM=xterm-256color
1157+ (which is now the default Fedora since Fedora 18), the meta key is
1158+ used to enable support of 8 bit characters (ANSI sequence
1159+ "\033[1034h").
1160+
1161+ With libedit, this call makes readline() crash. */
1162+ rl_variable_bind ("enable-meta-key" , "off" );
1163+ }
1164+ }
11621165
11631166 /* Initialize (allows .inputrc to override)
11641167 *
You can’t perform that action at this time.
0 commit comments