You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
REPL tab completion of a global name imports lazily imported modules #159266
A tab after space does not trigger tab completion for me, and should not. Did you actually enter no<tab>? If so, I think the current behavior is correct. If one want to access library_module_with_long_name.some_attribute, one would want lo<tab to display library_module_with_long_name as a possible completion. The purpose of lazy imports is to speed program startup by skipping imports that are not immediately needed, and often, which may never by needed). It is irrelevant in interactive mode.
With respect to the additional space, that was an oversight (I was trying to make the repro easier to read).
I have now updated the example above to remove the space as that is the exact behavior needed to trigger the reification.
The proposed implementation would still provide library_module_with_long_name as an option, without loading the module.
The module stays lazy and is still listed for the user. The one change is that we would no longer apply coloring for the imported module/attrs until after they are reified.
This specific corner case is a correctness fix, not a performance optimization.
Activity
terryjreedy commentedon Oct 12, 2026
A tab after space does not trigger tab completion for me, and should not. Did you actually enter
no<tab>? If so, I think the current behavior is correct. If one want to accesslibrary_module_with_long_name.some_attribute, one would wantlo<tabto displaylibrary_module_with_long_nameas a possible completion. The purpose of lazy imports is to speed program startup by skipping imports that are not immediately needed, and often, which may never by needed). It is irrelevant in interactive mode.brittanyrey commentedon Oct 13, 2026
With respect to the additional space, that was an oversight (I was trying to make the repro easier to read).
I have now updated the example above to remove the space as that is the exact behavior needed to trigger the reification.
The proposed implementation would still provide
library_module_with_long_nameas an option, without loading the module.The module stays lazy and is still listed for the user. The one change is that we would no longer apply coloring for the imported module/attrs until after they are reified.
This specific corner case is a correctness fix, not a performance optimization.
yeti107 commentedon Oct 13, 2026
Hi! Just wondering if this is still open? If it is i'd love to have it assigned to me so I can start work on it ASAP.
Thanks
brittanyrey commentedon Oct 13, 2026
Hi @yeti107,
There is already a linked PR #159267 addressing the issue.
Thanks for your interest.