Merging upstream version 3.0.27.

Signed-off-by: Daniel Baumann <daniel@debian.org>
This commit is contained in:
Daniel Baumann 2025-02-09 18:34:28 +01:00
parent 479a0e81b5
commit 7807e8a7bd
Signed by: daniel
GPG key ID: FBB4F0E80A80222F
25 changed files with 105 additions and 56 deletions

View file

@ -7,6 +7,7 @@ way we don't block the UI of for instance ``turtle`` and other Tk libraries.
in readline. ``prompt-toolkit`` doesn't understand that input hook, but this
will fix it for Tk.)
"""
from __future__ import annotations
import sys
@ -23,9 +24,8 @@ def _inputhook_tk(inputhook_context: InputHookContext) -> None:
Run the Tk eventloop until prompt-toolkit needs to process the next input.
"""
# Get the current TK application.
import tkinter
import _tkinter # Keep this imports inline!
import tkinter
root = tkinter._default_root # type: ignore