Skip to content

tkinter events not working since Python 3.14 w/ Tk 9.0 #141237

Closed

Description

@der-eismann

Bug report

Bug description:

Hey everyone, I tried updating an application that uses tkinter from Python 3.12 to 3.14, however it stopped working. After spending some time debugging and testing I found that 3.13 works fine, but ultimately it stops working with 3.14, probably because of the upgrade to TCL/TK 9.0.
Essentially it looks like the event bindings are broken, at least the handlers are not called when an event is generated. I couldn't find anything in the changelogs so far. Here's a minimal example that I can run on Fedora with 3.12 and 3.13, but not with 3.14 (taken from here:

import threading
import time
import queue
from tkinter import *

ws = Tk()
ws.geometry("200x200")
comque= queue.Queue()

def timeThread():
    prestime = 0
    while 1:
        comque.put(prestime)
        
        try:
            ws.event_generate('<<TimeChanged>>', when='tail')
        except TclError:
            break
        time.sleep(1)
        prestime += 1

clcvar = IntVar()
Label(ws, textvariable=clcvar, width=9).pack(pady=10)

def timeChanged(event):
    clcvar.set(comque.get())

ws.bind('<<TimeChanged>>', timeChanged)
Thr=threading.Thread(target=timeThread)
Thr.start()

ws.mainloop()

Thanks in advance!

CPython versions tested on:

3.14

Operating systems tested on:

Linux

Activity

  1. added
    type-bug
    on Nov 8, 2025
  2. changed the title [-]tkinter events not working since Python 3.14[/-] [+]tkinter events not working since Python 3.14 w/ TK 9.0[/+] on Nov 8, 2025
  3. changed the title [-]tkinter events not working since Python 3.14 w/ TK 9.0[/-] [+]tkinter events not working since Python 3.14 w/ Tk 9.0[/+] on Nov 11, 2025
  4. chrstphrchvz commented on Nov 12, 2025

    @chrstphrchvz
    Contributor

    I can reproduce this issue, and I have verified it would be fixed by gh-128103.

  5. zware commented on Nov 12, 2025

    @zware
    Member

    Thanks, @chrstphrchvz. I've merged gh-128103, so closing this as fixed. Thanks for the report, @der-eismann!

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

    extension-modulestopic-tkintertype-bug

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions