diff --git a/stdlib/@tests/stubtest_allowlists/py313.txt b/stdlib/@tests/stubtest_allowlists/py313.txt index 5ec73a305..57fa5d26a 100644 --- a/stdlib/@tests/stubtest_allowlists/py313.txt +++ b/stdlib/@tests/stubtest_allowlists/py313.txt @@ -3,29 +3,6 @@ # ========================= -# ======= -# >= 3.13 -# ======= - -# TODO: triage these new errors -tkinter.Misc.busy -tkinter.Misc.busy_cget -tkinter.Misc.busy_config -tkinter.Misc.busy_configure -tkinter.Misc.busy_current -tkinter.Misc.busy_forget -tkinter.Misc.busy_hold -tkinter.Misc.busy_status -tkinter.Misc.tk_busy -tkinter.Misc.tk_busy_cget -tkinter.Misc.tk_busy_config -tkinter.Misc.tk_busy_configure -tkinter.Misc.tk_busy_current -tkinter.Misc.tk_busy_forget -tkinter.Misc.tk_busy_hold -tkinter.Misc.tk_busy_status - - # ==================================== # Pre-existing errors from Python 3.12 # ==================================== diff --git a/stdlib/tkinter/__init__.pyi b/stdlib/tkinter/__init__.pyi index 1550f0ac8..751de523b 100644 --- a/stdlib/tkinter/__init__.pyi +++ b/stdlib/tkinter/__init__.pyi @@ -371,6 +371,9 @@ class _GridIndexInfo(TypedDict, total=False): uniform: str | None weight: int +class _BusyInfo(TypedDict): + cursor: _Cursor + class Misc: master: Misc | None tk: _tkinter.TkappType @@ -408,6 +411,25 @@ class Misc: def after_info(self, id: str | None = None) -> tuple[str, ...]: ... def bell(self, displayof: Literal[0] | Misc | None = 0) -> None: ... + if sys.version_info >= (3, 13): + # Supports options from `_BusyInfo`` + def tk_busy_cget(self, option: Literal["cursor"]) -> _Cursor: ... + busy_cget = tk_busy_cget + def tk_busy_configure(self, cnf: Any = None, **kw: Any) -> Any: ... + tk_busy_config = tk_busy_configure + busy_configure = tk_busy_configure + busy_config = tk_busy_configure + def tk_busy_current(self, pattern: str | None = None) -> list[Misc]: ... + busy_current = tk_busy_current + def tk_busy_forget(self) -> None: ... + busy_forget = tk_busy_forget + def tk_busy_hold(self, **kw: Unpack[_BusyInfo]) -> None: ... + tk_busy = tk_busy_hold + busy_hold = tk_busy_hold + busy = tk_busy_hold + def tk_busy_status(self) -> bool: ... + busy_status = tk_busy_status + def clipboard_get(self, *, displayof: Misc = ..., type: str = ...) -> str: ... def clipboard_clear(self, *, displayof: Misc = ...) -> None: ... def clipboard_append(self, string: str, *, displayof: Misc = ..., format: str = ..., type: str = ...) -> None: ...