Subject: 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: Liu Hui <[email-masked]>
Date: Mon, 17 Feb 2025 13:55:56 +0800

On Sun, Feb 16, 2025 at 6:20 PM kobarity <[email-masked]> wrote:

> Here's what's happening.  ipython --simple-prompt on Python 3.13 is
> indirectly importing rlcompleter

Thanks for the investigation. It seems that pdb imports rlcompleter
since python 3.13 and ipython always imports pdb at startup.

> So it seems to me that it would be reasonable to override
> rlcompleter.__main__ so that the default completer works properly.  I
> think the attached revised patch is slightly better than my previous
> patch, since it does not add "__main__" to globals.  This change
> affects only IPython.  I added some comments and the commit message.
>
> I would like to hear your opinions.

Thank you. I think the fix is good.

BTW, python 3.13 introduces pyrepl and leads to the warning "can't use
pyrepl: terminal doesn't have the required clear capability;
TERM=dumb".

Maybe we should set PYTHON_BASIC_REPL=1 to suppress the warning when
starting the inferior python process?