[New-bugs-announce] [issue37821] IDLE shell uses wrong namespace for completions
Tal Einat
report at bugs.python.org
Sun Aug 11 07:17:08 EDT 2019
New submission from Tal Einat <taleinat at gmail.com>:
Currently, when running an IDLE shell with a sub-process, it will allow completing attributes of objects not actually in the shell's namespace. For example, typing "codecs." will bring up completions for the codecs module's attributes, despite that not having being imported. Further, if one uses the completion, this results in a NameError exception, since "codecs" isn't actually in the namespace.
AFAICT, the intended behavior is as follows:
* If a shell exists, completion should use the namespace used for evaluating code in the shell. (Note that this is slightly different when running a shell without a sub-process.)
* If no shell exists (only editor windows are open), completion should use the global namespace + sys.modules.
----------
assignee: terry.reedy
components: IDLE
messages: 349386
nosy: taleinat, terry.reedy
priority: normal
severity: normal
status: open
title: IDLE shell uses wrong namespace for completions
type: behavior
versions: Python 3.7, Python 3.8, Python 3.9
_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue37821>
_______________________________________
More information about the New-bugs-announce
mailing list