[issue37766] IDLE autocomplete: revise fetch_completions, add htest

Terry J. Reedy report at bugs.python.org
Thu Jul 9 20:06:53 EDT 2020


Terry J. Reedy <tjreedy at udel.edu> added the comment:

The attached tem4.py validates a refactoring of the mode ATTRS, what '' computation of bigl.  The removal of dict 'namespace' invalidates 

                    if "__all__" in bigl:
                        smalll = sorted(eval("__all__", namespace))

However, this small branch should be removed as explained in msg373432.  The removal will also fix an IDLE execution process crash resulting from a user bug.  Given "__all__ = [modname], Show Completions results in
TypeError: cannot pickle 'module' object
and a crash restart.

After "import modname", "modname." wait or Show Completions crashes due to 
                        if "__all__" in bigl:
                            smalll = sorted(entity.__all__)
Since this is needed, the fix is to filter entity.__all__.

----------
Added file: https://bugs.python.org/file49311/tem4.py

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue37766>
_______________________________________


More information about the Python-bugs-list mailing list