Subject: Re: bug#76205: 31.0.50; 31.0.50; python.el completion broken for non-builtin objects in IPython 8.30.0 & Python 3.13.2

From: Visuwesh <[email-masked]>
Date: Thu, 13 Feb 2025 22:34:07 +0530

[வியாழன் பிப்ரவரி 13, 2025] kobarity wrote:

> Visuwesh wrote:
>> 
>> >> One workaround is to disable native completion:
>> >> M-x python-shell-completion-native-turn-off
>> >> It will be a little more inconvenient than the native completion.
>> 
>> Thank you very much, this works good enough for my needs.  I can work in
>> peace now.
>
> Then you might want to customize
> `python-shell-completion-native-enable' or
> `python-shell-completion-native-disabled-interpreters'.

Thanks once again for the helpful tip!

>> > The problem seems to be not related to emacs, because the completion
>> > of non-builtin objects doesn't work in terminal too (IPython 8.32.0
>> > and Python 3.13.2):
>> >
>> > 1. run ipython in a terminal: ipython3 --simple-prompt -i
>> >
>> > 2. type the following code:
>> >    import readline
>> >    import rlcompleter
>> >    readline.parse_and_bind("tab: complete")
>> >    import numpy as np
>> >
>> > 3. type np.<TAB>, there is no completion
>> >
>> >
>> > If I change the completer to others (e.g. jedi):
>> >    from jedi.utils import setup_readline
>> >    setup_readline()
>> >
>> > then the completion works in both terminal and emacs.
>
> Thanks for pointing this out.  So I confirmed that the following
> workaround is also effective.
>
> PYTHONSTARTUP="$(python -m jedi repl)" emacs -nw -Q

So...what do we do from here?  Unfortunately, I know next to nothing
about this area to file a sensible bug report myself.