diff -r 135e1a8144ec Lib/test/test_readline.py --- a/Lib/test/test_readline.py Mon Jan 09 11:21:37 2017 +0100 +++ b/Lib/test/test_readline.py Mon Jan 09 21:37:24 2017 +0100 @@ -216,7 +216,7 @@ output = bytearray() [master, slave] = pty.openpty() args = (sys.executable, '-c', script) - proc = subprocess.Popen(args, stdin=slave, stdout=slave, stderr=slave) + proc = subprocess.Popen(args, stdin=slave, stdout=slave) os.close(slave) with ExitStack() as cleanup: cleanup.enter_context(proc) diff -r 135e1a8144ec Modules/readline.c --- a/Modules/readline.c Mon Jan 09 11:21:37 2017 +0100 +++ b/Modules/readline.c Mon Jan 09 21:37:24 2017 +0100 @@ -1188,6 +1188,7 @@ rlhandler(char *text) { completed_input_string = text; + fprintf(stderr, "\nchar *text: \"%s\"\n", text); rl_callback_handler_remove(); }