3.14: add annotationlib, update typing and inspect (#13985)

This commit is contained in:
Jelle Zijlstra
2025-05-10 14:25:06 -07:00
committed by GitHub
parent 8bd5455b32
commit 5ff32f377c
10 changed files with 488 additions and 477 deletions
+10 -1
View File
@@ -5,6 +5,7 @@ import sys
import types
from _collections_abc import dict_items, dict_keys, dict_values
from _typeshed import (
AnnotationForm,
AnyStr_co,
ConvertibleToFloat,
ConvertibleToInt,
@@ -72,6 +73,9 @@ from typing_extensions import ( # noqa: Y023
deprecated,
)
if sys.version_info >= (3, 14):
from _typeshed import AnnotateFunc
_T = TypeVar("_T")
_I = TypeVar("_I", default=int)
_T_co = TypeVar("_T_co", covariant=True)
@@ -215,6 +219,9 @@ class type:
def __ror__(self, value: Any, /) -> types.UnionType: ...
if sys.version_info >= (3, 12):
__type_params__: tuple[TypeVar | ParamSpec | TypeVarTuple, ...]
__annotations__: dict[str, AnnotationForm]
if sys.version_info >= (3, 14):
__annotate__: AnnotateFunc | None
class super:
@overload
@@ -1017,7 +1024,9 @@ class function:
def __globals__(self) -> dict[str, Any]: ...
__name__: str
__qualname__: str
__annotations__: dict[str, Any]
__annotations__: dict[str, AnnotationForm]
if sys.version_info >= (3, 14):
__annotate__: AnnotateFunc | None
__kwdefaults__: dict[str, Any]
if sys.version_info >= (3, 10):
@property