Skip to content

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

Open
loic-simon wants to merge 4 commits intopython:mainfrom
loic-simon:pyrepl-module-completion-hardcode-math-integer
Open

gh-69605: Add math.integer to PyREPL module completer hardcoded list#144811
loic-simon wants to merge 4 commits intopython:mainfrom
loic-simon:pyrepl-module-completion-hardcode-math-integer

Conversation

@loic-simon
Copy link
Contributor

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

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!

Copy link
Member

@johnslavik johnslavik left a comment

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>
Copy link
Member

@johnslavik johnslavik left a comment

Choose a reason for hiding this comment

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

Fine by me!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants