[Python-checkins] cpython (merge 3.5 -> default): Issue #24266: Merge readline Ctrl+C handling from 3.5

martin.panter python-checkins at python.org
Tue Mar 22 07:17:59 EDT 2016


https://hg.python.org/cpython/rev/322d30816d36
changeset:   100649:322d30816d36
parent:      100647:c1edc2abbf97
parent:      100648:af6e8e1d15fa
user:        Martin Panter <vadmium+py at gmail.com>
date:        Tue Mar 22 09:28:58 2016 +0000
summary:
  Issue #24266: Merge readline Ctrl+C handling from 3.5

files:
  Misc/NEWS          |  3 +++
  Modules/readline.c |  3 +++
  2 files changed, 6 insertions(+), 0 deletions(-)


diff --git a/Misc/NEWS b/Misc/NEWS
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -232,6 +232,9 @@
 Library
 -------
 
+- Issue #24266: Ctrl+C during Readline history search now cancels the search
+  mode when compiled with Readline 7.
+
 - Issue #26590: Implement a safe finalizer for the _socket.socket type. It now
   releases the GIL to close the socket.
 
diff --git a/Modules/readline.c b/Modules/readline.c
--- a/Modules/readline.c
+++ b/Modules/readline.c
@@ -1138,6 +1138,9 @@
 #endif
             if (s < 0) {
                 rl_free_line_state();
+#if defined(RL_READLINE_VERSION) && RL_READLINE_VERSION >= 0x0700
+                rl_callback_sigcleanup();
+#endif
                 rl_cleanup_after_signal();
                 rl_callback_handler_remove();
                 *signal = 1;

-- 
Repository URL: https://hg.python.org/cpython


More information about the Python-checkins mailing list