diff --git a/stdlib/annotationlib.pyi b/stdlib/annotationlib.pyi index c87f4ec6d..3679dc29d 100644 --- a/stdlib/annotationlib.pyi +++ b/stdlib/annotationlib.pyi @@ -28,6 +28,20 @@ if sys.version_info >= (3, 14): @final class ForwardRef: + __slots__ = ( + "__forward_is_argument__", + "__forward_is_class__", + "__forward_module__", + "__weakref__", + "__arg__", + "__globals__", + "__extra_names__", + "__code__", + "__ast_node__", + "__cell__", + "__owner__", + "__stringifier_dict__", + ) __forward_is_argument__: bool __forward_is_class__: bool __forward_module__: str | None diff --git a/stdlib/argparse.pyi b/stdlib/argparse.pyi index 8a8cc047f..bce20e092 100644 --- a/stdlib/argparse.pyi +++ b/stdlib/argparse.pyi @@ -154,7 +154,7 @@ class ArgumentParser(_AttributeHolder, _ActionsContainer): exit_on_error: bool = True, *, suggest_on_error: bool = False, - color: bool = False, + color: bool = True, ) -> None: ... else: def __init__( diff --git a/stdlib/compression/zstd/__init__.pyi b/stdlib/compression/zstd/__init__.pyi index 24a9633c4..d5da4be03 100644 --- a/stdlib/compression/zstd/__init__.pyi +++ b/stdlib/compression/zstd/__init__.pyi @@ -35,6 +35,7 @@ zstd_version_info: Final[tuple[int, int, int]] COMPRESSION_LEVEL_DEFAULT: Final = _zstd.ZSTD_CLEVEL_DEFAULT class FrameInfo: + __slots__ = ("decompressed_size", "dictionary_id") decompressed_size: int dictionary_id: int def __init__(self, decompressed_size: int, dictionary_id: int) -> None: ... diff --git a/stdlib/concurrent/interpreters/_crossinterp.pyi b/stdlib/concurrent/interpreters/_crossinterp.pyi index b073aefa7..7cf1ea347 100644 --- a/stdlib/concurrent/interpreters/_crossinterp.pyi +++ b/stdlib/concurrent/interpreters/_crossinterp.pyi @@ -12,6 +12,7 @@ if sys.version_info >= (3, 13): # needed to satisfy pyright checks for Python < classonly = classmethod class UnboundItem: + __slots__ = () def __new__(cls) -> Never: ... @classonly def singleton(cls, kind: str, module: str, name: str = "UNBOUND") -> Self: ... diff --git a/stdlib/concurrent/interpreters/_queues.pyi b/stdlib/concurrent/interpreters/_queues.pyi index 39a057ee9..7493f8780 100644 --- a/stdlib/concurrent/interpreters/_queues.pyi +++ b/stdlib/concurrent/interpreters/_queues.pyi @@ -51,8 +51,8 @@ if sys.version_info >= (3, 13): # needed to satisfy pyright checks for Python < timeout: SupportsIndex | None = None, *, unbounditems: _AnyUnbound | None = None, - _delay: float = ..., + _delay: float = 0.01, ) -> None: ... def put_nowait(self, obj: object, *, unbounditems: _AnyUnbound | None = None) -> None: ... - def get(self, timeout: SupportsIndex | None = None, *, _delay: float = ...) -> object: ... + def get(self, timeout: SupportsIndex | None = None, *, _delay: float = 0.01) -> object: ... def get_nowait(self) -> object: ... diff --git a/stdlib/io.pyi b/stdlib/io.pyi index 1313df183..d301d700e 100644 --- a/stdlib/io.pyi +++ b/stdlib/io.pyi @@ -67,7 +67,9 @@ class TextIOBase(_TextIOBase, IOBase): ... if sys.version_info >= (3, 14): class Reader(Protocol[_T_co]): + __slots__ = () def read(self, size: int = ..., /) -> _T_co: ... class Writer(Protocol[_T_contra]): + __slots__ = () def write(self, data: _T_contra, /) -> int: ... diff --git a/stdlib/pdb.pyi b/stdlib/pdb.pyi index fb6c486ab..0c16f48e2 100644 --- a/stdlib/pdb.pyi +++ b/stdlib/pdb.pyi @@ -131,7 +131,11 @@ class Pdb(Bdb, Cmd): def completedefault(self, text: str, line: str, begidx: int, endidx: int) -> list[str]: ... def do_commands(self, arg: str) -> bool | None: ... - def do_break(self, arg: str, temporary: bool = ...) -> bool | None: ... + if sys.version_info >= (3, 14): + def do_break(self, arg: str, temporary: bool = False) -> bool | None: ... + else: + def do_break(self, arg: str, temporary: bool | Literal[0, 1] = 0) -> bool | None: ... + def do_tbreak(self, arg: str) -> bool | None: ... def do_enable(self, arg: str) -> bool | None: ... def do_disable(self, arg: str) -> bool | None: ...