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 — On macOS with Python 3.15, test_idle and test_tkinter fail with `_tkinter.TclError: invalid command name "::tk::unsupported::MacWindowStyle"` on Tk/Tcl 9.1 · Issue #159517 · python/cpython

On macOS with Python 3.15, test_idle and test_tkinter fail with _tkinter.TclError: invalid command name "::tk::unsupported::MacWindowStyle" on Tk/Tcl 9.1 #159517

New issue
Copy link
New issue
Copy link
Closed
Closed
On macOS with Python 3.15, test_idle and test_tkinter fail with _tkinter.TclError: invalid command name "::tk::unsupported::MacWindowStyle" on Tk/Tcl 9.1#159517
Copy link
Labels
OS-mactestsTests in the Lib/test dirTests in the Lib/test dirtopic-tkintertype-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error

Description

@vstinner
vstinner
opened on Oct 16, 2026
Issue body actions

Tcl/Tk was recently upgraded from Tcl 9.0/Tk 9.0 to Tcl 9.1/Tk 9.1 on macOS GitHub Action. Since this update, many tests of test_idle and test_tkinter started to fail on "macOS (free-threading) / build and test (macos-26)" (GHA CI) with _tkinter.TclError: invalid command name "::tk::unsupported::MacWindowStyle".

Example of failed build: https://github.com/python/cpython/actions/runs/38874850453/job/116887409891?pr=159515.

test.pythoninfo after:

tkinter.TCL_VERSION: 9.1
tkinter.TK_VERSION: 9.1
tkinter.info_patchlevel: 9.1.0

Previous build when the tests passed: https://github.com/python/cpython/actions/runs/38680918836/job/116256273820

test.pythoninfo before:

tkinter.TCL_VERSION: 9.0
tkinter.TK_VERSION: 9.0
tkinter.info_patchlevel: 9.0.4

Linked PRs

  • [3.15] gh-159517: Modernize tkinter.simpledialog #159518
  • [3.14] gh-159517: Modernize tkinter.simpledialog (GH-159518) #159522
  • gh-159517: Do not use ::tk::unsupported::MacWindowStyle in IDLE on Tk 9.1 #159527
  • [3.15] gh-159517: Do not use ::tk::unsupported::MacWindowStyle in IDLE on Tk 9.1 (GH-159527) #159624
  • [3.14] gh-159517: Do not use ::tk::unsupported::MacWindowStyle in IDLE on Tk 9.1 (GH-159527) #159625

Activity

  1. vstinner
    added
    type-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error
    testsTests in the Lib/test dirTests in the Lib/test dir
    OS-mac
    topic-tkinter
    on Oct 16, 2026
  2. vstinner commented on Oct 16, 2026

    @vstinner
    vstinner
    on Oct 16, 2026
    MemberAuthor
    More actions

    Example of failure:

    ERROR: test_open_and_close (idlelib.idle_test.test_searchbase.SearchDialogBaseTest.test_open_and_close)
    ----------------------------------------------------------------------
    Traceback (most recent call last):
      File "/Users/runner/work/cpython/cpython/Lib/idlelib/idle_test/test_searchbase.py", line 52, in test_open_and_close
        self.dialog.open(text)
        ~~~~~~~~~~~~~~~~^^^^^^
      File "/Users/runner/work/cpython/cpython/Lib/idlelib/searchbase.py", line 55, in open
        self.create_widgets()
        ~~~~~~~~~~~~~~~~~~~^^
      File "/Users/runner/work/cpython/cpython/Lib/idlelib/searchbase.py", line 103, in create_widgets
        _setup_dialog(top)
        ~~~~~~~~~~~~~^^^^^
      File "/Users/runner/work/cpython/cpython/Lib/tkinter/simpledialog.py", line 265, in _setup_dialog
        w.tk.call("::tk::unsupported::MacWindowStyle", "style",
        ~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
                  w, "moveableModal", "")
                  ^^^^^^^^^^^^^^^^^^^^^^^
    _tkinter.TclError: invalid command name "::tk::unsupported::MacWindowStyle"
    

    cc @terryjreedy @serhiy-storchaka

  3. vstinner
    changed the title [-]test_idle and test_tkinter fail with `_tkinter.TclError: invalid command name "::tk::unsupported::MacWindowStyle"` on Tk 9.1/Tcl 9.1[/-] [+]On macOS, test_idle and test_tkinter fail with `_tkinter.TclError: invalid command name "::tk::unsupported::MacWindowStyle"` on Tk/Tcl 9.1[/+] on Oct 16, 2026
  4. vstinner
    changed the title [-]On macOS, test_idle and test_tkinter fail with `_tkinter.TclError: invalid command name "::tk::unsupported::MacWindowStyle"` on Tk/Tcl 9.1[/-] [+]On macOS with Python 3.15, test_idle and test_tkinter fail with `_tkinter.TclError: invalid command name "::tk::unsupported::MacWindowStyle"` on Tk/Tcl 9.1[/+] on Oct 16, 2026
  5. vstinner
    added 3 commits that reference this issue on Oct 16, 2026

    pythongh-159517: Modernize tkinter.simpledialog

    b25326b

    [3.15] gh-159517: Modernize tkinter.simpledialog (#159518)

    173dabe

    [3.14] gh-159517: Modernize tkinter.simpledialog (GH-159518) (#159522)

    8c27786
  6. serhiy-storchaka commented on Oct 16, 2026

    @serhiy-storchaka
    serhiy-storchaka
    on Oct 16, 2026
    Member
    More actions

    Thank you, @vstinner. I did not expect CI will use Tcl 9.1/Tk 9.1 so soon, especially on non-main branches. I do not recommend to use 9.1.0. It has many bugs in new features. The next bugfix release will came with their fixes, and also with many fixes of old bugs and important macOS fixes.

    #159527 fixes other use of ::tk::unsupported::MacWindowStyle in IDLE.

  7. vstinner commented on Oct 16, 2026

    @vstinner
    vstinner
    on Oct 16, 2026
    MemberAuthor
    More actions

    Thank you, @vstinner.

    You're welcome.

    I did not expect CI will use Tcl 9.1/Tk 9.1 so soon, especially on non-main branches. I do not recommend to use 9.1.0. It has many bugs in new features. The next bugfix release will came with their fixes, and also with many fixes of old bugs and important macOS fixes.

    The failed 3.15 job uses macOS 26 arm image. The surprising thing is that https://github.com/actions/runner-images/blob/main/images/macos/macos-26-arm64-Readme.md still mentions "Tcl/Tk 8.6.18" whereas it was "Tcl/Tk 9.0" a few hours ago, and it's now "Tcl/Tk 9.1". The README is outdated, and I looked at the wrong README :-)

  8. serhiy-storchaka
    added 3 commits that reference this issue on Oct 17, 2026

    gh-159517: Do not use ::tk::unsupported::MacWindowStyle in IDLE on Tk…

    e5ef47e

    [3.14] gh-159517: Do not use ::tk::unsupported::MacWindowStyle in IDL…

    2261a3e

    [3.15] gh-159517: Do not use ::tk::unsupported::MacWindowStyle in IDL…

    b4031e0
  9. vstinner commented on Oct 18, 2026

    @vstinner
    vstinner
    on Oct 18, 2026
    MemberAuthor
    More actions

    Both changes have been merged and backported to stable versions, I close the issue.

  10. vstinner
    closed this as completedon Oct 18, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    OS-mactestsTests in the Lib/test dirTests in the Lib/test dirtopic-tkintertype-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error

    Projects

    No projects

      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.