Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

IDLE: properly handle '(' and ')' within calls #84691

Closed
wyz23x2 mannequin opened this issue May 5, 2020 · 13 comments
Closed

IDLE: properly handle '(' and ')' within calls #84691

wyz23x2 mannequin opened this issue May 5, 2020 · 13 comments
Assignees
Labels
3.10 only security fixes topic-IDLE type-bug An unexpected behavior, bug, or error

Comments

@wyz23x2
Copy link
Mannequin

wyz23x2 mannequin commented May 5, 2020

BPO 40511
Nosy @terryjreedy, @taleinat, @csabella, @miss-islington, @wyz23x2
PRs
  • bpo-40511: fix unnecessary flashing of calltips #20910
  • [3.9] bpo-40511: Stop unwanted flashing of IDLE calltips (GH-20910) #23093
  • [3.8] bpo-40511: Stop unwanted flashing of IDLE calltips (GH-20910) #23094
  • Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.

    Show more details

    GitHub fields:

    assignee = 'https://github.com/terryjreedy'
    closed_at = <Date 2020-11-02.04:51:17.813>
    created_at = <Date 2020-05-05.12:09:51.200>
    labels = ['expert-IDLE', 'type-bug', '3.10']
    title = "IDLE: properly handle '(' and ')' within calls"
    updated_at = <Date 2020-11-03.13:29:21.219>
    user = 'https://github.com/wyz23x2'

    bugs.python.org fields:

    activity = <Date 2020-11-03.13:29:21.219>
    actor = 'wyz23x2'
    assignee = 'terry.reedy'
    closed = True
    closed_date = <Date 2020-11-02.04:51:17.813>
    closer = 'terry.reedy'
    components = ['IDLE']
    creation = <Date 2020-05-05.12:09:51.200>
    creator = 'wyz23x2'
    dependencies = []
    files = []
    hgrepos = []
    issue_num = 40511
    keywords = ['patch']
    message_count = 13.0
    messages = ['368133', '368134', '368205', '371605', '371616', '371622', '371623', '371625', '380174', '380176', '380177', '380178', '380275']
    nosy_count = 5.0
    nosy_names = ['terry.reedy', 'taleinat', 'cheryl.sabella', 'miss-islington', 'wyz23x2']
    pr_nums = ['20910', '23093', '23094']
    priority = 'normal'
    resolution = 'fixed'
    stage = 'resolved'
    status = 'closed'
    superseder = None
    type = 'behavior'
    url = 'https://bugs.python.org/issue40511'
    versions = ['Python 3.10']

    @wyz23x2
    Copy link
    Mannequin Author

    wyz23x2 mannequin commented May 5, 2020

    The yellow frame blinks as shown in mp4. It's annoying and isn't good to the eyes.

    @wyz23x2 wyz23x2 mannequin added 3.7 (EOL) end of life 3.8 only security fixes 3.9 only security fixes labels May 5, 2020
    @wyz23x2 wyz23x2 mannequin assigned terryjreedy May 5, 2020
    @wyz23x2 wyz23x2 mannequin added topic-IDLE type-bug An unexpected behavior, bug, or error 3.7 (EOL) end of life 3.8 only security fixes 3.9 only security fixes labels May 5, 2020
    @wyz23x2 wyz23x2 mannequin assigned terryjreedy May 5, 2020
    @wyz23x2 wyz23x2 mannequin added topic-IDLE type-bug An unexpected behavior, bug, or error labels May 5, 2020
    @wyz23x2
    Copy link
    Mannequin Author

    wyz23x2 mannequin commented May 5, 2020

    OMG, request too large. I can't upload mp4 /(ㄒoㄒ)/~~

    @wyz23x2 wyz23x2 mannequin changed the title Yellow hint frame blinks when entering () in strings IDLE yellow hint frame blinks when entering () in strings May 5, 2020
    @wyz23x2 wyz23x2 mannequin changed the title Yellow hint frame blinks when entering () in strings IDLE yellow hint frame blinks when entering () in strings May 5, 2020
    @wyz23x2 wyz23x2 mannequin changed the title IDLE yellow hint frame blinks when entering () in strings IDLE yellow hint frame blinks when entering () in strings in functions/classes May 5, 2020
    @wyz23x2 wyz23x2 mannequin changed the title IDLE yellow hint frame blinks when entering () in strings IDLE yellow hint frame blinks when entering () in strings in functions/classes May 5, 2020
    @terryjreedy
    Copy link
    Member

    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.

    @terryjreedy
    Copy link
    Member

    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.

    @terryjreedy terryjreedy added 3.10 only security fixes and removed 3.7 (EOL) end of life 3.8 only security fixes 3.9 only security fixes labels Jun 15, 2020
    @terryjreedy terryjreedy changed the title IDLE yellow hint frame blinks when entering () in strings in functions/classes IDLE: properly handle '(' and ')' within calls Jun 15, 2020
    @terryjreedy terryjreedy added 3.10 only security fixes and removed 3.7 (EOL) end of life 3.8 only security fixes 3.9 only security fixes labels Jun 15, 2020
    @terryjreedy terryjreedy changed the title IDLE yellow hint frame blinks when entering () in strings in functions/classes IDLE: properly handle '(' and ')' within calls Jun 15, 2020
    @taleinat
    Copy link
    Contributor

    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.

    @taleinat
    Copy link
    Contributor

    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.

    @taleinat
    Copy link
    Contributor

    Confirmed on latest master on macOS 10.15.5 with Tcl/Tk 8.6.10.

    @taleinat
    Copy link
    Contributor

    See PR #65109 with a fix.

    @terryjreedy
    Copy link
    Member

    New changeset da7bb7b by Tal Einat in branch 'master':
    bpo-40511: Stop unwanted flashing of IDLE calltips (GH-20910)
    da7bb7b

    @miss-islington
    Copy link
    Contributor

    New changeset 79e9f06 by Miss Skeleton (bot) in branch '3.9':
    bpo-40511: Stop unwanted flashing of IDLE calltips (GH-20910)
    79e9f06

    @miss-islington
    Copy link
    Contributor

    New changeset 1341582 by Miss Skeleton (bot) in branch '3.8':
    bpo-40511: Stop unwanted flashing of IDLE calltips (GH-20910)
    1341582

    @terryjreedy
    Copy link
    Member

    wyz, thank you for the report. It should be fixed now.

    @wyz23x2
    Copy link
    Mannequin Author

    wyz23x2 mannequin commented Nov 3, 2020

    Thanks! :D

    @ezio-melotti ezio-melotti transferred this issue from another repository Apr 10, 2022
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
    Labels
    3.10 only security fixes topic-IDLE type-bug An unexpected behavior, bug, or error
    Projects
    None yet
    Development

    No branches or pull requests

    3 participants