Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 0 additions & 3 deletions stdlib/@tests/stubtest_allowlists/py315.txt
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,6 @@ importlib.resources._common.package_to_anchor
mailbox._ProxyFile.__class_getitem__
multiprocessing.process.BaseProcess.__init__
threading.Condition.locked
tkinter.Image.__iter__
tkinter.Misc.__iter__
tkinter.font.Font.__iter__

# =============================================================
# Allowlist entries that cannot or should not be fixed; >= 3.15
Expand Down
6 changes: 6 additions & 0 deletions stdlib/tkinter/__init__.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -390,6 +390,9 @@ class Misc:
master: Misc | None
tk: _tkinter.TkappType
children: dict[str, Widget]
if sys.version_info >= (3, 15):
__iter__: ClassVar[None] # prevent using __getitem__ for iteration

def destroy(self) -> None: ...
def deletecommand(self, name: str) -> None: ...
def tk_strictMotif(self, boolean=None): ...
Expand Down Expand Up @@ -3939,6 +3942,9 @@ class _PhotoImageLike(_Image): ...
class Image(_Image):
name: Incomplete
tk: _tkinter.TkappType
if sys.version_info >= (3, 15):
__iter__: ClassVar[None] # prevent using __getitem__ for iteration

def __init__(self, imgtype, name=None, cnf={}, master: Misc | _tkinter.TkappType | None = None, **kw) -> None: ...
def __del__(self) -> None: ...
def __setitem__(self, key, value) -> None: ...
Expand Down
3 changes: 3 additions & 0 deletions stdlib/tkinter/font.pyi
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import _tkinter
import itertools
import sys
import tkinter
from typing import Any, ClassVar, Final, Literal, TypeAlias, TypedDict, overload, type_check_only
from typing_extensions import Unpack
Expand Down Expand Up @@ -41,6 +42,8 @@ class _MetricsDict(TypedDict):
class Font:
name: str
delete_font: bool
if sys.version_info >= (3, 15):
__iter__: ClassVar[None] # prevent using __getitem__ for iteration
counter: ClassVar[itertools.count[int]] # undocumented
def __init__(
self,
Expand Down