GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Eliminate 'ThemeChanged' warning when running IDLE tests · Issue #71383 · python/cpython

Eliminate 'ThemeChanged' warning when running IDLE tests #71383

New issue
Copy link
New issue
Copy link
Closed
Closed
Eliminate 'ThemeChanged' warning when running IDLE tests#71383
Copy link
Assignees
terryjreedy
Labels
3.9 (EOL)end of lifeend of lifetestsTests in the Lib/test dirTests in the Lib/test dirtopic-IDLEtopic-tkintertype-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error

Description

@terryjreedy
terryjreedy
opened on Jun 3, 2016
Issue body actions
BPO 27196
Nosy @terryjreedy, @ned-deily, @serhiy-storchaka

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 2016-06-03.08:00:06.971>
labels = ['expert-IDLE', 'type-bug', 'expert-tkinter', '3.9']
title = "Eliminate 'ThemeChanged' warning when running IDLE tests"
updated_at = <Date 2020-01-07.22:42:55.465>
user = 'https://github.com/terryjreedy'

bugs.python.org fields:

activity = <Date 2020-01-07.22:42:55.465>
actor = 'terry.reedy'
assignee = 'terry.reedy'
closed = False
closed_date = None
closer = None
components = ['IDLE', 'Tkinter']
creation = <Date 2016-06-03.08:00:06.971>
creator = 'terry.reedy'
dependencies = []
files = []
hgrepos = []
issue_num = 27196
keywords = []
message_count = 7.0
messages = ['267078', '267081', '267226', '267228', '268861', '269089', '359559']
nosy_count = 4.0
nosy_names = ['terry.reedy', 'ned.deily', 'python-dev', 'serhiy.storchaka']
pr_nums = []
priority = 'normal'
resolution = None
stage = 'needs patch'
status = 'open'
superseder = None
type = 'behavior'
url = 'https://bugs.python.org/issue27196'
versions = ['Python 3.9']

Linked PRs

  • GH-71383: IDLE - Document testing subsets of modules #104463
  • [3.11] GH-71383: IDLE - Document testing subsets of modules (GH-104463) #104464
  • gh-71383: add upstream fix to macOS installer #108806
  • gh-71383: Update Tcl/Tk version in Windows to our patched build containing a targeted upstream fix #112973

Activity

Next
  1. terryjreedy commented on Jun 3, 2016

    @terryjreedy
    terryjreedy
    on Jun 3, 2016
    MemberAuthor
    More actions

    When running "python_d.exe -m test_idle from console or when running test file from IDLE after starting it in either console or by import, the following sometimes appears.

    can't invoke "event" command: application has been destroyed
    while executing
    "event generate $w <<ThemeChanged>>"
    (procedure "ttk::ThemeChanged" line 6)
    invoked from within
    "ttk::ThemeChanged"

    Serhiy, this is pobably not critical, but it is annoying. Perhaps the 'kill-callbacks' patch would fix this. Still, I try to have IDLE tests cleanup properly.

    Known repeatable occurrences:

    • test_configdialog.ConfigDialogTest.test_dialog, when run from IDLE after import, but not when part of suite.
    • test_replace.ReplaceDialogTest.test_default_command, 3 times, when run as part suite, but not when run from IDLE after import.
  2. terryjreedy
    added
    topic-IDLE
    topic-tkinter
    type-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error
    on Jun 3, 2016
  3. serhiy-storchaka commented on Jun 3, 2016

    @serhiy-storchaka
    serhiy-storchaka
    on Jun 3, 2016
    Member
    More actions

    This looks as a duplicate of bpo-20567.

  4. python-dev commented on Jun 4, 2016

    @python-dev
    python-devmannequin
    on Jun 4, 2016
    Mannequin
    More actions

    New changeset 0207c6203f84 by Terry Jan Reedy in branch '3.5':
    Issue bpo-27196: Stop 'application destroyed' warnings when running IDLE tests.
    https://hg.python.org/cpython/rev/0207c6203f84

    New changeset 2d864ac472f0 by Terry Jan Reedy in branch 'default':
    Merge issue bpo-27196 from 3.5: Stop IDLE test 'application destroyed' warnings.
    https://hg.python.org/cpython/rev/2d864ac472f0

  5. terryjreedy commented on Jun 4, 2016

    @terryjreedy
    terryjreedy
    on Jun 4, 2016
    MemberAuthor
    More actions

    I closed bpo-20567 after finishing what I intended to do 3 years ago. I decided make this a separate issue for trying Serhiy's suggestion of updata_idletasks. Pursuing 'no default root' is bpo-24137.

    3 other files also gave the warning, once, when run alone. 2 of the 4 'warned with the test suite in 3.5 and 3 of 4 in 3.6. Adding root.update or root.update_idletasks to all 4 fixed all warnings I know of for both versions. It appears to be a coincidence that the warnings consistently appeared where they did. I also added a note about this fix to README.txt.

    There is no known problem in 2.7. I fixed 3.5 also because the warnings sometimes appear in buildbot reports, and they don't need the noise.

  6. terryjreedy
    closed this as completedon Jun 4, 2016
  7. terryjreedy
    self-assigned this
    on Jun 4, 2016
  8. ned-deily commented on Jun 19, 2016

    @ned-deily
    ned-deily
    on Jun 19, 2016
    Member
    More actions

    FWIW, I'm still seeing these errors on OS X (10.11.5 with ActiveTcl 8.5.18) using 2.7.12rc1, 3.5.2rc1, and top-of-trunk 3.6.0. They do not occur on the same platform when using 2.7.11 or 3.5.1.

    For example:
    $ /usr/local/bin/python2.7
    Python 2.7.12rc1 (v2.7.12rc1:13912cd1e7e8, Jun 11 2016, 15:32:34)
    [GCC 4.2.1 (Apple Inc. build 5666) (dot 3)] on darwin [...]
    $ /usr/local/bin/python2.7 -m test.regrtest -ugui -j3 test_idle
    can't invoke "event" command: application has been destroyed
    while executing
    "event generate $w <<ThemeChanged>>"
    (procedure "ttk::ThemeChanged" line 6)
    invoked from within
    "ttk::ThemeChanged"
    can't invoke "event" command: application has been destroyed
    while executing
    "event generate $w <<ThemeChanged>>"
    (procedure "ttk::ThemeChanged" line 6)
    invoked from within
    "ttk::ThemeChanged"
    [1/1] test_idle
    1 test OK.

    $ /usr/local/bin/python3.5
    Python 3.5.2rc1 (v3.5.2rc1:68feec6488b2, Jun 11 2016, 21:59:53)
    [GCC 4.2.1 (Apple Inc. build 5666) (dot 3)] on darwin [...]
    $ /usr/local/bin/python3.5 -m test.regrtest -ugui test_idle
    [1/1] test_idle
    can't invoke "event" command:  application has been destroyed
        while executing
    "event generate $w <<ThemeChanged>>"
        (procedure "ttk::ThemeChanged" line 6)
        invoked from within
    "ttk::ThemeChanged"
    1 test OK.
    
    $ ./bin/python3.6
    Python 3.6.0a2+ (default, Jun 19 2016, 13:19:06)
    [GCC 4.2.1 Compatible Apple LLVM 7.3.0 (clang-703.0.29)] on darwin [...]
    $ ./bin/python3.6 -m test -ugui -j3 test_idle
    Run tests in parallel using 3 child processes
    0:00:02 [1/1] test_idle passed
    can't invoke "event" command:  application has been destroyed
        while executing
    "event generate $w <<ThemeChanged>>"
        (procedure "ttk::ThemeChanged" line 6)
        invoked from within
    "ttk::ThemeChanged"
    1 test OK.
    Total duration: 0:00:03
  9. ned-deily
    reopened this on Jun 19, 2016
  10. terryjreedy commented on Jun 22, 2016

    @terryjreedy
    terryjreedy
    on Jun 22, 2016
    MemberAuthor
    More actions

    The only thing I still see is a pair of ThemeChanged warnings from 2.7. Using binary search, I identified test_editmenu as the culprit. This in spite of all the cleanup I can think of

        @classmethod
        def tearDownClass(cls):
            del cls.text, cls.entry, cls.spin
            cls.root.clipboard_clear()
            cls.root.update_idletasks()
            cls.root.update()
            cls.root.destroy()
            del cls.root

    When I tried to determine which test method(s) gave the warning, as disable all to make sure the warnings vanished, which then did. But after re-enabling, the warnings did not come back -- until they did after a few more runs. I suspect that the only permanent solution will be Serhiy's patch to have .destroy cancel pending callbacks.

  11. terryjreedy commented on Jan 7, 2020

    @terryjreedy
    terryjreedy
    on Jan 7, 2020
    MemberAuthor
    More actions

    2.7 EOL.

    Ned, do you still see Themed Changed? I don't on 3.8 on Macbook. with 10.14 mohave(?)

  12. terryjreedy
    added
    3.9 (EOL)end of lifeend of life
    on Jan 7, 2020
  13. ezio-melotti
    transferred this issue fromon Apr 10, 2022
  14. 20 remaining items

  15. miss-islington
    added a commit that references this issue on Nov 21, 2023

    pythongh-110950: add upstream Tk fixes to macOS installer. (pythonGH-…

    d641520
  16. ned-deily
    added 2 commits that reference this issue on Nov 21, 2023

    [3.11] gh-110950: add upstream Tk fixes to macOS installer. (GH-111041)…

    253ad78

    [3.12] gh-110950: add upstream Tk fixes to macOS installer. (GH-111041)…

    fab9824
  17. ned-deily commented on Nov 21, 2023

    @ned-deily
    ned-deily
    on Nov 21, 2023
    Member
    More actions

    Thanks for the PRs. The fix for Tk in the macOS installer has now been merged for release in 3.13.0a2, 3.12.1, and 3.11.7.

  18. zooba
    added 3 commits that reference this issue on Dec 11, 2023

    pythongh-71383: Update Tcl/Tk version in Windows to our patched build…

    78bf42a

    pythongh-71383: Update Tcl/Tk in Windows installer to 8.6.13.1

    e6479bd

    gh-71383: Update Tcl/Tk version in Windows to our patched build conta…

    1c5fc02
  19. zooba commented on Dec 11, 2023

    @zooba
    zooba
    on Dec 11, 2023
    Member
    More actions

    Windows fix is now committed for 3.13. As discussed elsewhere, I'm not comfortable backporting the patched build to 3.12 or earlier without someone present to promptly debug and fix any issues that arise.

  20. zooba
    closed this as completedon Dec 11, 2023
  21. github-project-automation
    moved this to Done in IDLE Issueson Dec 11, 2023
  22. terryjreedy commented on Dec 12, 2023

    @terryjreedy
    terryjreedy
    on Dec 12, 2023
    MemberAuthor
    More actions

    Unless Serhiy wants to do the Windows backports, I am happy to have this closed. I currently cannot repeat the problems on 3.11/12 Windows I reported last May in #71383 (comment). (This is not the first time the messages have appeared and disappeared.) And the patch should prevent any future appearances. If something reappears in 3.12, I now know not to waste more time trying to make it go away. If something reappears in main after this patch, it should be a new issue.

    Reacted by Steve Dower
  23. aisk
    added 2 commits that reference this issue on Feb 11, 2024

    pythongh-110950: add upstream Tk fixes to macOS installer. (pythonGH-…

    19c76ff

    pythongh-71383: Update Tcl/Tk version in Windows to our patched build…

    2d03a54
  24. Glyphack
    added 2 commits that reference this issue on Sep 2, 2024

    pythongh-110950: add upstream Tk fixes to macOS installer. (pythonGH-…

    95cecbd

    pythongh-71383: Update Tcl/Tk version in Windows to our patched build…

    05de533
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

  • @terryjreedy
    terryjreedy

Labels

3.9 (EOL)end of lifeend of lifetestsTests in the Lib/test dirTests in the Lib/test dirtopic-IDLEtopic-tkintertype-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error

Projects

  • IDLE Issues
    Status
    Done
    Show more project fields

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions

You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.