classification
Title: IDLE: properly handle '(' and ')' within calls
Type: behavior Stage: resolved
Components: IDLE Versions: Python 3.10
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: terry.reedy Nosy List: cheryl.sabella, miss-islington, taleinat, terry.reedy, wyz23x2
Priority: normal Keywords: patch

Created on 2020-05-05 12:09 by wyz23x2, last changed 2020-11-03 13:29 by wyz23x2. This issue is now closed.

Pull Requests
URL Status Linked Edit
PR 20910 merged taleinat, 2020-06-16 09:18
PR 23093 merged miss-islington, 2020-11-02 04:00
PR 23094 merged miss-islington, 2020-11-02 04:00
Messages (13)
msg368133 - (view) Author: wyz23x2 (wyz23x2) * Date: 2020-05-05 12:09
The yellow frame blinks as shown in mp4. It's annoying and isn't good to the eyes.
msg368134 - (view) Author: wyz23x2 (wyz23x2) * Date: 2020-05-05 12:12
OMG, request too large. I can't upload mp4 /(愒o愒)/~~
msg368205 - (view) Author: Terry J. Reedy (terry.reedy) * (Python committer) Date: 2020-05-05 20:30
1. What OS and for Windows/Mac, version?
2. What Python release and from where and how installed?
   If not latest release of x.y, where x.y >= 3.7, consider upgrading.
3. Tcl/tk version (see Help => About IDLE?
4. How start IDLE?
5. What is a the minimum action needed to exhibit the behavior.  Copy and paste minimum code.
6. Describe behavior with more detail.  What you wrote is nothing like anything that should happen (which is why you report it), so it is hard to imagine.
msg371605 - (view) Author: Terry J. Reedy (terry.reedy) * (Python committer) Date: 2020-06-15 23:28
Each  '(' and ')' in an argument string such as in f('()(()()((((())))))))))))))') causes a blink.  Ditto with a comment withing the call.  A related bug is that any unquoted '(', as when one enters f((a+b)*c), dismisses the tip. 

Proposed partial solution: before displaying a tip, record the opening index (before the opening '(').  When there is an opening index, and '(' is keyed, ignore it; no parsing.  When the tip is closed (properly), removed the open index.  I believe paren matching would work properly.

The cause of blinks for ')' in strings and comments would need to be found and remedied.
msg371616 - (view) Author: Tal Einat (taleinat) * (Python committer) Date: 2020-06-16 07:01
I agree that this should be improved.

Terry, on the technical side, IDLE already has good tools for parsing the current code line/block and figuring out whether the cursor is in a string, a comment or parentheses. This should be possible to solve in a robust way without writing any new parsing logic.

I'll try to take a look at this soon.
msg371622 - (view) Author: Tal Einat (taleinat) * (Python committer) Date: 2020-06-16 08:35
> OMG, request too large. I can't upload mp4

You can try to reduce the video's resolution and/or framerate in order to reduce its size.

Usually screen captures are taken at high resolution and framerates by default, making the resulting video files very large, which is a sensible default but not great for attaching to bug reports.
msg371623 - (view) Author: Tal Einat (taleinat) * (Python committer) Date: 2020-06-16 08:43
Confirmed on latest master on macOS 10.15.5 with Tcl/Tk 8.6.10.
msg371625 - (view) Author: Tal Einat (taleinat) * (Python committer) Date: 2020-06-16 09:26
See PR GH-20910 with a fix.
msg380174 - (view) Author: Terry J. Reedy (terry.reedy) * (Python committer) Date: 2020-11-02 03:59
New changeset da7bb7b4d769350c5fd03e6cfb16b23dc265ed72 by Tal Einat in branch 'master':
bpo-40511: Stop unwanted flashing of IDLE calltips (GH-20910)
https://github.com/python/cpython/commit/da7bb7b4d769350c5fd03e6cfb16b23dc265ed72
msg380176 - (view) Author: miss-islington (miss-islington) Date: 2020-11-02 04:49
New changeset 79e9f06149f92798a8e11e3f1c62dad171312ab3 by Miss Skeleton (bot) in branch '3.9':
bpo-40511: Stop unwanted flashing of IDLE calltips (GH-20910)
https://github.com/python/cpython/commit/79e9f06149f92798a8e11e3f1c62dad171312ab3
msg380177 - (view) Author: miss-islington (miss-islington) Date: 2020-11-02 04:50
New changeset 1341582e165841810e2fbf89e23be0e92b4a9fdd by Miss Skeleton (bot) in branch '3.8':
bpo-40511: Stop unwanted flashing of IDLE calltips (GH-20910)
https://github.com/python/cpython/commit/1341582e165841810e2fbf89e23be0e92b4a9fdd
msg380178 - (view) Author: Terry J. Reedy (terry.reedy) * (Python committer) Date: 2020-11-02 04:51
wyz, thank you for the report.  It should be fixed now.
msg380275 - (view) Author: wyz23x2 (wyz23x2) * Date: 2020-11-03 13:29
Thanks! :D
History
Date User Action Args
2020-11-03 13:29:21wyz23x2setmessages: + msg380275
2020-11-02 04:51:17terry.reedysetstatus: open -> closed
resolution: fixed
messages: + msg380178

stage: patch review -> resolved
2020-11-02 04:50:02miss-islingtonsetmessages: + msg380177
2020-11-02 04:49:46miss-islingtonsetmessages: + msg380176
2020-11-02 04:00:14miss-islingtonsetpull_requests: + pull_request22009
2020-11-02 04:00:07miss-islingtonsetnosy: + miss-islington
pull_requests: + pull_request22008
2020-11-02 04:00:00terry.reedysetmessages: + msg380174
2020-06-16 09:26:29taleinatsetmessages: + msg371625
2020-06-16 09:18:26taleinatsetkeywords: + patch
stage: patch review
pull_requests: + pull_request20092
2020-06-16 08:43:50taleinatsetmessages: + msg371623
2020-06-16 08:35:02taleinatsetmessages: + msg371622
2020-06-16 07:01:10taleinatsetmessages: + msg371616
2020-06-15 23:28:28terry.reedysetnosy: + taleinat, cheryl.sabella
title: IDLE yellow hint frame blinks when entering () in strings in functions/classes -> IDLE: properly handle '(' and ')' within calls
messages: + msg371605

versions: + Python 3.10, - Python 3.7, Python 3.8, Python 3.9
2020-05-05 20:30:42terry.reedysetmessages: + msg368205
2020-05-05 12:13:27wyz23x2settitle: IDLE yellow hint frame blinks when entering () in strings -> IDLE yellow hint frame blinks when entering () in strings in functions/classes
2020-05-05 12:13:07wyz23x2settitle: Yellow hint frame blinks when entering () in strings -> IDLE yellow hint frame blinks when entering () in strings
2020-05-05 12:12:57wyz23x2setmessages: + msg368134
2020-05-05 12:09:51wyz23x2create