New submission from Tal Einat <talei...@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 <rep...@bugs.python.org> <https://bugs.python.org/issue37821> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com