Subject: bug#24401:

From: Davor Rotim <[email-masked]>
Date: Thu, 01 Dec 2016 21:23:12 +0100

Luckily Readline has conditional constructs:

# .inputrc
$if Bash
set colored-stats on
$endif

This enables us to have color tab completion and avoid the bug with Emacs.
As for the alternative, I've provided a patch in the attachment.

Kind regards,

Davor Rotim
diff --git a/lisp/progmodes/python.el b/lisp/progmodes/python.el
index d0d4a7f..ddab9c0 100644
--- a/lisp/progmodes/python.el
+++ b/lisp/progmodes/python.el
@@ -3455,7 +3455,9 @@ With argument MSG show activation/deactivation message."
             (format "was t and %S is not part of the "
                     (file-name-nondirectory python-shell-interpreter))
             "`python-shell-completion-native-disabled-interpreters' "
-            "list.  Native completions have been disabled locally. "))
+            "list. If you are using GNU Bash check that the colored-stats "
+            "variable is conditionally enabled in your Readline init file. "
+            "Native completions have been disabled locally. "))
           (python-shell-completion-native-turn-off msg))))))
 
 (defun python-shell-completion-native-turn-on-maybe-with-msg ()