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 Show completions pop-up not working on Ubuntu Linux #89356

Closed
taleinat opened this issue Sep 14, 2021 · 14 comments
Closed

IDLE Show completions pop-up not working on Ubuntu Linux #89356

taleinat opened this issue Sep 14, 2021 · 14 comments
Assignees
Labels
3.10 only security fixes 3.11 only security fixes topic-IDLE type-bug An unexpected behavior, bug, or error

Comments

@taleinat
Copy link
Contributor

BPO 45193
Nosy @terryjreedy, @taleinat, @ned-deily, @ambv, @pablogsal, @miss-islington
PRs
  • bpo-45193: IDLE: fix auto-complete list not appearing on Linux #28328
  • bpo-45193: Restore IDLE completion boxes on Ubuntu #28343
  • [3.10] bpo-45193: Restore IDLE completion boxes on Ubuntu (GH-28343) #28347
  • bpo-45193: News for IDLE PR_28343 #28348
  • [3.10] bpo-45193: News for IDLE PR_28343 (GH-28348) #28369
  • gh-96910: IDLE - make autocomplete winnconfig handler only trigger once #28332
  • 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 = None
    created_at = <Date 2021-09-14.06:29:20.436>
    labels = ['expert-IDLE', 'type-bug', '3.9']
    title = 'IDLE Show completions pop-up not working on Ubuntu Linux'
    updated_at = <Date 2022-01-24.01:25:34.268>
    user = 'https://github.com/taleinat'

    bugs.python.org fields:

    activity = <Date 2022-01-24.01:25:34.268>
    actor = 'taleinat'
    assignee = 'terry.reedy'
    closed = False
    closed_date = None
    closer = None
    components = ['IDLE']
    creation = <Date 2021-09-14.06:29:20.436>
    creator = 'taleinat'
    dependencies = []
    files = []
    hgrepos = []
    issue_num = 45193
    keywords = ['patch']
    message_count = 12.0
    messages = ['401758', '401760', '401767', '401802', '401803', '401812', '401815', '401876', '401881', '401910', '402160', '403147']
    nosy_count = 6.0
    nosy_names = ['terry.reedy', 'taleinat', 'ned.deily', 'lukasz.langa', 'pablogsal', 'miss-islington']
    pr_nums = ['28328', '28343', '28347', '28348', '28369', '28332']
    priority = None
    resolution = None
    stage = 'patch review'
    status = 'open'
    superseder = None
    type = 'behavior'
    url = 'https://bugs.python.org/issue45193'
    versions = ['Python 3.9']

    @taleinat
    Copy link
    Contributor Author

    The completion window never appears with Python version 3.9.7 and with the current main branch.

    Ubuntu 20.04 (reproduced on two separate machines)
    Tested with Tcl/Tk versions 8.6.10 and 8.6.11.

    This is directly caused by the fix for issue bpo-40128. Commenting out that line resolves this issue entirely.

    (See also the PR for that fix, PR #70859.)

    @taleinat taleinat added 3.10 only security fixes 3.11 only security fixes 3.9 only security fixes labels Sep 14, 2021
    @taleinat taleinat added topic-IDLE 3.9 only security fixes type-bug An unexpected behavior, bug, or error labels Sep 14, 2021
    @taleinat taleinat added topic-IDLE type-bug An unexpected behavior, bug, or error labels Sep 14, 2021
    @taleinat
    Copy link
    Contributor Author

    I've also tested this on Windows 10 with the latest main branch (to be 3.11). The completions window works as expected with or without the recently added .update_idletasks() call.

    I do recommend limiting this to macOS (platform.system() == "Darwin").

    Ideally we'd test this on macOS with several versions of tcl/tk (8.6.8, 8.6.9, 8.6.10, 8.6.11) and limit it to only those versions where the fix is required:

    TK_VERSION = tuple(map(int, tk.call("info", "patchlevel").split(".")))
    if (8, 6, 8) <= TK_VERSION < (8, 6, 10):
        acw.update_idletasks()

    Also we might check if calling .update() is enough, since that does less than .update_idletasks().

    @taleinat
    Copy link
    Contributor Author

    See PR #72515 with proposed fix. It should be tested on macOS with several relevant versions of Tcl/Tk to ensure that the Tk version range used is correct.

    @terryjreedy
    Copy link
    Member

    In msg401744 I suggested any of the following for the upcoming 3.10.0 release.

    1. Remove the new line.
    2. Disable the line by adding '#'.
    3. Make it conditional on macOS and 8.6.8.

    Thinking more, I am rejecting 3. because the line is not needed for IDLE and tk as installed by our macOS. As things stand now, I an only willing to support IDLE with the tk we install. But I will go with option 2 so that if someone tries to run IDLE with a different tk, and the line is needed, they only need to remove the '#'.

    A version of 3. is needed for 3.9 but this needs more data and discussion. In looking at your no-issue PR_28332, I realized that I would rather make a more extensive change than to patch a badly written function for at least the fourth time. I will open an issue for that PR and explain later.

    @terryjreedy
    Copy link
    Member

    I will just mention here that winconfig_event also calls update_idletasks, in what should be the proper place, and I think that the second call was only needed for mac tk 8.6.8 because of the unique-to-IDLE behavior I want to delete. I suspect that if we create the popup the same way we do with the others, we will not need the second call even on 8.6.8. But making sure 3.10.0 works comes first.

    @terryjreedy
    Copy link
    Member

    New changeset 1afc7b3 by Terry Jan Reedy in branch 'main':
    bpo-45193: Restore IDLE completion boxes on Ubuntu (GH-28343)
    1afc7b3

    @miss-islington
    Copy link
    Contributor

    New changeset 0c64569 by Miss Islington (bot) in branch '3.10':
    bpo-45193: Restore IDLE completion boxes on Ubuntu (GH-28343)
    0c64569

    @terryjreedy
    Copy link
    Member

    New changeset 9d76d28 by Terry Jan Reedy in branch 'main':
    bpo-45193: News for IDLE PR_28343 (GH-28348)
    9d76d28

    @miss-islington
    Copy link
    Contributor

    New changeset a5bc0ff by Miss Islington (bot) in branch '3.10':
    bpo-45193: News for IDLE PR_28343 (GH-28348)
    a5bc0ff

    @terryjreedy
    Copy link
    Member

    0c64569
    a5bc0ff

    are ready to be cherrypicked into into the 3.10.0 release branch.
    Once that is done, 'release blocker' can be removed, but issue should remain open for a separate fix for 3.9.

    @pablogsal
    Copy link
    Member

    are ready to be cherrypicked into into the 3.10.0 release branch.
    Once that is done, 'release blocker' can be removed, but issue should remain open for a separate fix for 3.9.

    Done! I am removing the release blocker and the 3.10, 3.11 version tags.

    Thanks Tal and Terry for all the work!

    @pablogsal pablogsal removed 3.10 only security fixes 3.11 only security fixes release-blocker labels Sep 19, 2021
    @pablogsal
    Copy link
    Member

    New changeset 7f2d049 by Pablo Galindo (Miss Islington (bot)) in branch '3.10':
    bpo-45193: Restore IDLE completion boxes on Ubuntu (GH-28343)
    7f2d049

    New changeset d08e4a8 by Pablo Galindo (Miss Islington (bot)) in branch '3.10':
    bpo-45193: News for IDLE PR_28343 (GH-28348)
    d08e4a8

    @ezio-melotti ezio-melotti transferred this issue from another repository Apr 10, 2022
    @iritkatriel
    Copy link
    Member

    It's too late for 3.9, right?

    @terryjreedy terryjreedy added 3.9 only security fixes and removed 3.9 only security fixes labels May 18, 2022
    @terryjreedy
    Copy link
    Member

    Yes. This was apparently fixed for 3.10 and 3.11 and left open for 3.9. But never got enough info to decide anything. Closing.

    @terryjreedy terryjreedy added 3.11 only security fixes 3.10 only security fixes and removed 3.9 only security fixes labels Jun 27, 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 3.11 only security fixes topic-IDLE type-bug An unexpected behavior, bug, or error
    Projects
    None yet
    Development

    No branches or pull requests

    5 participants