https://github.com/python/cpython/commit/c64baff1d82e8a113d971869b6074551e99eece9
commit: c64baff1d82e8a113d971869b6074551e99eece9
branch: main
author: Loïc Simon <[email protected]>
committer: pablogsal <[email protected]>
date: 2026-04-05T19:31:19+01:00
summary:
gh-69605: Add math.integer to PyREPL module completer hardcoded list (#144811)
files:
A
Misc/NEWS.d/next/Core_and_Builtins/2026-02-14-13-07-08.gh-issue-69605.4aL4hn.rst
M Lib/_pyrepl/_module_completer.py
M Lib/test/test_pyrepl/test_pyrepl.py
diff --git a/Lib/_pyrepl/_module_completer.py b/Lib/_pyrepl/_module_completer.py
index 2098d0a54aba31..bba59599e97923 100644
--- a/Lib/_pyrepl/_module_completer.py
+++ b/Lib/_pyrepl/_module_completer.py
@@ -23,6 +23,7 @@
# Standard library submodules that are not detected by pkgutil.iter_modules
# but can be imported, so should be proposed in completion
"collections": ["abc"],
+ "math": ["integer"],
"os": ["path"],
"xml.parsers.expat": ["errors", "model"],
}
diff --git a/Lib/test/test_pyrepl/test_pyrepl.py
b/Lib/test/test_pyrepl/test_pyrepl.py
index 18e88ce4e7724a..82628f79279930 100644
--- a/Lib/test/test_pyrepl/test_pyrepl.py
+++ b/Lib/test/test_pyrepl/test_pyrepl.py
@@ -1187,6 +1187,7 @@ def test_hardcoded_stdlib_submodules(self):
cases = (
("import collections.\t\n", "import collections.abc"),
("from os import \t\n", "from os import path"),
+ ("import math.\t\n", "import math.integer"),
("import xml.parsers.expat.\t\te\t\n\n", "import
xml.parsers.expat.errors"),
("from xml.parsers.expat import \t\tm\t\n\n", "from
xml.parsers.expat import model"),
)
diff --git
a/Misc/NEWS.d/next/Core_and_Builtins/2026-02-14-13-07-08.gh-issue-69605.4aL4hn.rst
b/Misc/NEWS.d/next/Core_and_Builtins/2026-02-14-13-07-08.gh-issue-69605.4aL4hn.rst
new file mode 100644
index 00000000000000..c00b7b99f8eea6
--- /dev/null
+++
b/Misc/NEWS.d/next/Core_and_Builtins/2026-02-14-13-07-08.gh-issue-69605.4aL4hn.rst
@@ -0,0 +1 @@
+Add :mod:`math.integer` to :term:`REPL` auto-completion of imports.
_______________________________________________
Python-checkins mailing list -- [email protected]
To unsubscribe send an email to [email protected]
https://mail.python.org/mailman3//lists/python-checkins.python.org
Member address: [email protected]