◐ Shell
clean mode source ↗

gh-140870: PyREPL auto-complete module attributes in import statements by loic-simon · Pull Request #140871 · python/cpython

@loic-simon loic-simon changed the title gh-14870: PyREPL auto-complete module attributes in import statements gh-140870: PyREPL auto-complete module attributes in import statements

Nov 1, 2025

StanFromIreland

Tighten the pyrepl completer around a few import-completion edge cases.
Relative imports now share one resolver, find_spec failures no longer
bubble out, failed-import tracking resets when sys.path changes, and
double-tab import actions are cleared once consumed.

The patch also keeps empty message lines intact in reader output and
updates the targeted tests and comments to match the intended behavior.

pablogsal

@loic-simon

ljfp pushed a commit to ljfp/cpython that referenced this pull request

Apr 25, 2026
…tements (python#140871)

Co-authored-by: Pablo Galindo Salgado <pablogsal@gmail.com>