diff --git a/stdlib/@tests/stubtest_allowlists/py314.txt b/stdlib/@tests/stubtest_allowlists/py314.txt index 286d11309..bb1dc21fe 100644 --- a/stdlib/@tests/stubtest_allowlists/py314.txt +++ b/stdlib/@tests/stubtest_allowlists/py314.txt @@ -20,12 +20,7 @@ asyncio.events._get_event_loop_policy asyncio.events._set_event_loop_policy asyncio.tasks.eager_task_factory builtins.bytearray.resize -builtins.classmethod.__annotate__ -builtins.classmethod.__class_getitem__ builtins.int.__round__ -builtins.memoryview.__class_getitem__ -builtins.staticmethod.__annotate__ -builtins.staticmethod.__class_getitem__ compression.gzip.GzipFile.readinto compression.gzip.GzipFile.readinto compression.gzip.GzipFile.readinto1 diff --git a/stdlib/builtins.pyi b/stdlib/builtins.pyi index 00728f42d..c0e645ef5 100644 --- a/stdlib/builtins.pyi +++ b/stdlib/builtins.pyi @@ -154,6 +154,9 @@ class staticmethod(Generic[_P, _R_co]): @property def __wrapped__(self) -> Callable[_P, _R_co]: ... def __call__(self, *args: _P.args, **kwargs: _P.kwargs) -> _R_co: ... + if sys.version_info >= (3, 14): + def __class_getitem__(cls, item: Any, /) -> GenericAlias: ... + __annotate__: AnnotateFunc | None class classmethod(Generic[_T, _P, _R_co]): @property @@ -170,6 +173,9 @@ class classmethod(Generic[_T, _P, _R_co]): __qualname__: str @property def __wrapped__(self) -> Callable[Concatenate[type[_T], _P], _R_co]: ... + if sys.version_info >= (3, 14): + def __class_getitem__(cls, item: Any, /) -> GenericAlias: ... + __annotate__: AnnotateFunc | None class type: # object.__base__ is None. Otherwise, it would be a type. @@ -915,6 +921,8 @@ class memoryview(Sequence[_I]): # See https://github.com/python/cpython/issues/125420 index: ClassVar[None] # type: ignore[assignment] count: ClassVar[None] # type: ignore[assignment] + if sys.version_info >= (3, 14): + def __class_getitem__(cls, item: Any, /) -> GenericAlias: ... @final class bool(int):