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 autocomplete: revise fetch_completions, add htest #81947

Open
terryjreedy opened this issue Aug 5, 2019 · 2 comments
Open

IDLE autocomplete: revise fetch_completions, add htest #81947

terryjreedy opened this issue Aug 5, 2019 · 2 comments
Assignees
Labels
3.9 only security fixes 3.10 only security fixes 3.11 only security fixes topic-IDLE type-feature A feature request or enhancement

Comments

@terryjreedy
Copy link
Member

BPO 37766
Nosy @terryjreedy, @E-Paine
Files
  • tem4.py
  • 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 2019-08-05.20:34:53.940>
    labels = ['expert-IDLE', 'type-feature', '3.9', '3.10', '3.11']
    title = 'IDLE autocomplete: revise fetch_completions, add htest'
    updated_at = <Date 2021-06-01.16:42:15.522>
    user = 'https://github.com/terryjreedy'

    bugs.python.org fields:

    activity = <Date 2021-06-01.16:42:15.522>
    actor = 'epaine'
    assignee = 'terry.reedy'
    closed = False
    closed_date = None
    closer = None
    components = ['IDLE']
    creation = <Date 2019-08-05.20:34:53.940>
    creator = 'terry.reedy'
    dependencies = []
    files = ['49311']
    hgrepos = []
    issue_num = 37766
    keywords = []
    message_count = 2.0
    messages = ['349069', '373434']
    nosy_count = 2.0
    nosy_names = ['terry.reedy', 'epaine']
    pr_nums = []
    priority = 'normal'
    resolution = None
    stage = 'needs patch'
    status = 'open'
    superseder = None
    type = 'enhancement'
    url = 'https://bugs.python.org/issue37766'
    versions = ['Python 3.9', 'Python 3.10', 'Python 3.11']

    @terryjreedy
    Copy link
    Member Author

    bpo-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 bpo-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.

    @terryjreedy terryjreedy added 3.7 (EOL) end of life 3.8 only security fixes 3.9 only security fixes labels Aug 5, 2019
    @terryjreedy terryjreedy self-assigned this Aug 5, 2019
    @terryjreedy terryjreedy added topic-IDLE type-feature A feature request or enhancement labels Aug 5, 2019
    @terryjreedy
    Copy link
    Member Author

    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__.

    @E-Paine E-Paine mannequin added 3.10 only security fixes 3.11 only security fixes and removed 3.7 (EOL) end of life 3.8 only security fixes labels Jun 1, 2021
    @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.9 only security fixes 3.10 only security fixes 3.11 only security fixes topic-IDLE type-feature A feature request or enhancement
    Projects
    Status: No status
    Development

    No branches or pull requests

    1 participant