Skip to content

REPL does not show completions for some members of the Enum module #139398

@RafaelWO

Description

@RafaelWO

Bug report

Bug description:

While working on improving the Enum documentation, I noticed that all Enum _sunder_ names are not shown in the completion suggestions. Some examples:

$ ./python
Python 3.15.0a0 (heads/main:e18dda96c9, Sep 28 2025, 18:14:51) [GCC 13.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
Ctrl click to launch VS Code Native REPL
>>> from enum import Enum
>>> Enum._
Enum._add_member_(                  Enum._convert_(     Enum._find_data_repr_(     Enum._find_new_(
Enum._check_for_existing_members_(  Enum._create_(      Enum._find_data_type_(     Enum._get_mixins_(
>>> Enum._add_alias_
<function Enum._add_alias_ at 0x7d38f05fc1d0>

I don't know if this also affects other modules... but I guess it would be great to have a test that checks the completion coverage of the REPL across the stdlib - or is there already a test like this?

Either way, I'm happy to help fix this issue and create a PR if one could guide me to the place where the REPL builds the "completion database" 🙂

CPython versions tested on:

CPython main branch

Operating systems tested on:

Linux

Linked PRs

Metadata

Metadata

Assignees

No one assigned

    Labels

    stdlibStandard Library Python modules in the Lib/ directorytopic-replRelated to the interactive shelltype-bugAn unexpected behavior, bug, or error

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions