Subject: bug#25067: #25067 Emacs pretest 25.1.91 - ipython completion

From: [email-masked]
Date: Sat, 04 Feb 2017 09:39:46 -0500

Eli Zaretskii <[email-masked]> writes:

>> From: [email-masked]
>> Date: Fri, 03 Feb 2017 19:03:40 -0500
>> Cc: "[email-masked]" <[email-masked]>
>> 
>> The behaviour from 25.1 can be restored by doing
>> 
>>     (add-to-list 'python-shell-completion-native-disabled-interpreters
>>                  "ipython")
>> 
>> So it looks like the problem is the fix for #24401 which enables native
>> completion work for python 3.5, also enables it for ipython, but native
>> completion doesn't actually work for ipython.
>
> Is there any safe way to fix this for Emacs 25.2?

I think the patch below is safe.  Although I can't say that I understand
what "native completion" actually means.

--- i/lisp/progmodes/python.el
+++ w/lisp/progmodes/python.el
@@ -3255,8 +3255,10 @@ python-shell-completion-string-code
   "Completion string code must work for (i)pdb.")
 
 (defcustom python-shell-completion-native-disabled-interpreters
-  ;; PyPy's readline cannot handle some escape sequences yet.
-  (list "pypy")
+  ;; PyPy's readline cannot handle some escape sequences yet.  Native
+  ;; completion was found to be non-functional for IPython (see
+  ;; Bug#25067).
+  (list "pypy" "ipython")
   "List of disabled interpreters.
 When a match is found, native completion is disabled."
   :version "25.1"