Skip to content

gh-69605: Add math.integer to PyREPL module completer hardcoded list - #144811

Merged
pablogsal merged 5 commits into
python:mainfrom
loic-simon:pyrepl-module-completion-hardcode-math-integer
Apr 5, 2026
Merged

pablogsal merged 5 commits into
python:mainfrom
loic-simon:pyrepl-module-completion-hardcode-math-integer

Conversation

@loic-simon

@loic-simon loic-simon commented Feb 13, 2026 •

Copy link
Copy Markdown
Contributor

Add the new math.integer submodule to the hardcoded list of stdlib modules that cannot be detected by pkgutil (implemented in #138268).

See this DPO post for more context about why this is necessary in the first place. I also talk about a new test to ensure this list doesn't get more out of sync, but it builds on the work I did in #140871 (to ensure we don't import a "dangerous" module), so I'll propose it after that MR is merged.

I don't think this change needs a specific issue, but happy to do create one if needed!

@johnslavik johnslavik left a comment •

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cool thing!

Personally, I'd add a news entry. math.integer is a 3.15+ module and your first change also lives in 3.14. To me, it makes sense to record what was added where.

Co-authored-by: Bartosz Sławecki <bartosz@ilikepython.com>

@johnslavik johnslavik left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fine by me!

@pablogsal
pablogsal merged commit c64baff into python:main Apr 5, 2026
56 checks passed
ljfp pushed a commit to ljfp/cpython that referenced this pull request Apr 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

3 participants