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

Fix and document idlelib/idle_test/template.py #78098

Closed
doko42 opened this issue Jun 20, 2018 · 7 comments
Closed

Fix and document idlelib/idle_test/template.py #78098

doko42 opened this issue Jun 20, 2018 · 7 comments
Assignees
Labels
3.7 (EOL) end of life 3.8 only security fixes topic-IDLE type-bug An unexpected behavior, bug, or error

Comments

@doko42
Copy link
Member

doko42 commented Jun 20, 2018

BPO 33917
Nosy @terryjreedy, @doko42, @taleinat, @ned-deily, @csabella, @miss-islington
PRs
  • bpo-33917: Fix and document idlelib/idle_test/template.py #7830
  • [3.7] bpo-33917: Fix and document idlelib/idle_test/template.py (GH-7830) #7831
  • [3.6] bpo-33917: Fix and document idlelib/idle_test/template.py (GH-7830) #7832
  • 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 2018-06-20.21:59:44.402>
    created_at = <Date 2018-06-20.16:54:43.594>
    labels = ['3.8', 'expert-IDLE', 'type-bug', '3.7']
    title = 'Fix and document idlelib/idle_test/template.py'
    updated_at = <Date 2018-06-27.00:12:17.211>
    user = 'https://github.com/doko42'

    bugs.python.org fields:

    activity = <Date 2018-06-27.00:12:17.211>
    actor = 'ned.deily'
    assignee = 'terry.reedy'
    closed = True
    closed_date = <Date 2018-06-20.21:59:44.402>
    closer = 'terry.reedy'
    components = ['IDLE']
    creation = <Date 2018-06-20.16:54:43.594>
    creator = 'doko'
    dependencies = []
    files = []
    hgrepos = []
    issue_num = 33917
    keywords = ['3.6regression', '3.7regression']
    message_count = 7.0
    messages = ['320099', '320103', '320112', '320114', '320117', '320119', '320527']
    nosy_count = 6.0
    nosy_names = ['terry.reedy', 'doko', 'taleinat', 'ned.deily', 'cheryl.sabella', 'miss-islington']
    pr_nums = ['7830', '7831', '7832']
    priority = None
    resolution = 'fixed'
    stage = 'resolved'
    status = 'closed'
    superseder = None
    type = 'behavior'
    url = 'https://bugs.python.org/issue33917'
    versions = ['Python 3.6', 'Python 3.7', 'Python 3.8']

    @doko42
    Copy link
    Member Author

    doko42 commented Jun 20, 2018

    Seen with the 3.6 branch and the 3.7 branch at least. This file is installed by default, so should be valid syntax? If it's supposed to be that way, maybe call the template like template.py.in?

    Unpacking libpython3.6-testsuite (3.6.6~rc1-3) ...
    Setting up libpython3.6-testsuite (3.6.6~rc1-3) ...
    File "/usr/lib/python3.6/idlelib/idle_test/template.py", line 3
    from idlelib import
    ^
    SyntaxError: invalid syntax

    @terryjreedy
    Copy link
    Member

    I wrote it intentionally the way it is, for bpo-33855, as it made it maximally easily to use to complete the test suite. Since it caused a problem, I added a valid dummy name to be replaced, and fixed the other syntax error. The file now compiles, runs, and tests OK. New IDLE modules needing a new test file should be rare.

    I will submit the PR after I edit the readme to document the usage of the template.

    @terryjreedy terryjreedy changed the title idlelib/idle_test/template.py has invalid syntax Fix and document idlelib/idle_test/template.py Jun 20, 2018
    @terryjreedy terryjreedy added type-bug An unexpected behavior, bug, or error 3.7 (EOL) end of life 3.8 only security fixes labels Jun 20, 2018
    @terryjreedy
    Copy link
    Member

    Tal and Cheryl: I revised the template for IDLE tests, pulled it out of README.txt into template.py, and explained it in the readme. It has new code for cleaning up after instantiating EditorWindow in tests. Please follow for any new test file, including test_tooltip and test_squeezer. (They should both be pretty close already.)

    @terryjreedy
    Copy link
    Member

    New changeset 87a9273 by Terry Jan Reedy in branch 'master':
    bpo-33917: Fix and document idlelib/idle_test/template.py (GH-7830)
    87a9273

    @miss-islington
    Copy link
    Contributor

    New changeset a717c56 by Miss Islington (bot) in branch '3.7':
    bpo-33917: Fix and document idlelib/idle_test/template.py (GH-7830)
    a717c56

    @miss-islington
    Copy link
    Contributor

    New changeset 7c853d0 by Miss Islington (bot) in branch '3.6':
    bpo-33917: Fix and document idlelib/idle_test/template.py (GH-7830)
    7c853d0

    @ned-deily
    Copy link
    Member

    FTR, the problem change was merged/backported after 3.7.0rc1 and 3.6.6rc1 so doko must have been working from a development branch and not a release tag. The original and its fix will first be officially released in 3.7.1 and 3.6.7 so there's really no need for a correction NEWS entry; it doesn't hurt either.

    @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.7 (EOL) end of life 3.8 only security fixes topic-IDLE type-bug An unexpected behavior, bug, or error
    Projects
    None yet
    Development

    No branches or pull requests

    4 participants