[New-bugs-announce] [issue27609] IDLE completions: format, factor, and fix

Terry J. Reedy report at bugs.python.org
Sun Jul 24 20:03:08 EDT 2016


New submission from Terry J. Reedy:

IDLE completions are currently implemented in two files: autocomplete.py and autocomplete_w.py.  (Before 3.6, these were AutoComplete.py and AutoCompleteWindow.py.) The first handles 'open' events, decideds whether to open a window, and gathers possible completions.  The second open a popup and works with the sorted list of possible completions. There are several tracker issues already.

#15786 Code completion problems with mouse and <return>.
      These lead to freezes on on Mac.  Severity: bad; prioriy: high.
#16198 Tabbing in string brings up completion when it should not.
#17238 Enhance import statement completion.
#18766 Add completions for un-imported modules (by importing).
#18903 File completions are case sensitive, should not be on Windows.
#21261 Complete dictionary keys.
#22554 Popup window for names also.  

#27099 Convert autocomplete to normal feature, along with other 'extensions'.  Add delay to current tab.  Negative delay should disable auto-popups.
#27534 Move objects needed by run to run.py and import from there.

There are more that are not on the tracker.  Patches may be attached here or to new issues.

A. Use PEP8 style.  1.'return None' when there are non-None returns. 2. Docstrings for all functions.
B. Merge autocomplete_w into autocomplete.  This was anticipated in the renaming.  #27534 should be done first if possible, or soon after.
C. Refactor.  1 #27534.  2. Put list and scrollbar in Frame?  For future single-window IDLE?  This might make testing easier. 3. Anything else making tests easier.
D. Make completions work for number literals ("1 .") as well a string literals ("'a'.").
E?. Make completions work with Entry as well as Multicall wrapping text?  Need use case first.  Load Modules may need own code.

Question: Why does 'dooneevent' appear in 2.x code and not 3.x code?

Tests: The currently only for a subset of autocomplete methods.  There are none for the buggy window.

First, a patch for A.1, return None.

----------
assignee: terry.reedy
messages: 271186
nosy: terry.reedy
priority: normal
severity: normal
stage: needs patch
status: open
title: IDLE completions: format, factor, and fix
type: behavior
versions: Python 3.6

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue27609>
_______________________________________


More information about the New-bugs-announce mailing list