This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: IDLE autocomplete: revise fetch_completions, add htest
Type: enhancement Stage: needs patch
Components: IDLE Versions: Python 3.11, Python 3.10, Python 3.9
process
Status: open Resolution:
Dependencies: Superseder:
Assigned To: terry.reedy Nosy List: epaine, terry.reedy
Priority: normal Keywords:

Created on 2019-08-05 20:34 by terry.reedy, last changed 2022-04-11 14:59 by admin.

Files
File name Uploaded Description Edit
tem4.py terry.reedy, 2020-07-10 00:06
Messages (2)
msg349069 - (view) Author: Terry J. Reedy (terry.reedy) * (Python committer) Date: 2019-08-05 20:34
#36419 did not cover fetch_ completions.  Most of the remaining 7% of autocomplete not covered by tests is in that function.  I want to rename smalll to small and bigl to big (and in test file); they are awkward to read and write.  I may want to revise otherwise to aid testing.

The test line referencing #36405 fails when run in autocomplete itself.  I need to refresh myself as to why I added it and revise or delete.

Some of the test_fetch_completion needs revision, and it should be split before being augmented.

An htest would make manual testing of intended behavior changes easier.
msg373434 - (view) Author: Terry J. Reedy (terry.reedy) * (Python committer) Date: 2020-07-10 00:06
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__.
History
Date User Action Args
2022-04-11 14:59:18adminsetgithub: 81947
2021-06-01 16:42:15epainesetnosy: + epaine

versions: + Python 3.10, Python 3.11, - Python 3.7, Python 3.8
2020-07-10 00:06:53terry.reedysetfiles: + tem4.py

messages: + msg373434
2019-08-05 20:37:01terry.reedylinkissue27609 dependencies
2019-08-05 20:34:53terry.reedycreate