Skip to content

Commit

Permalink
Update tkinter.Misc for 3.13 (#12367)
Browse files Browse the repository at this point in the history
  • Loading branch information
max-muoto authored Dec 28, 2024
1 parent 8726734 commit 92231a5
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 23 deletions.
23 changes: 0 additions & 23 deletions stdlib/@tests/stubtest_allowlists/py313.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
# ====================================
Expand Down
22 changes: 22 additions & 0 deletions stdlib/tkinter/__init__.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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: ...
Expand Down

0 comments on commit 92231a5

Please sign in to comment.