Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 705744a

Browse files
Update for typing_extensions 4.10 (#11438)
1 parent e5d25a7 commit 705744a

2 files changed

Lines changed: 11 additions & 2 deletions

File tree

stdlib/typing_extensions.pyi

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -182,6 +182,7 @@ __all__ = [
182182
"no_type_check",
183183
"no_type_check_decorator",
184184
"ReadOnly",
185+
"TypeIs",
185186
]
186187

187188
_T = typing.TypeVar("_T")
@@ -220,10 +221,14 @@ def IntVar(name: str) -> Any: ... # returns a new TypeVar
220221
class _TypedDict(Mapping[str, object], metaclass=abc.ABCMeta):
221222
__required_keys__: ClassVar[frozenset[str]]
222223
__optional_keys__: ClassVar[frozenset[str]]
223-
__readonly_keys__: ClassVar[frozenset[str]]
224-
__mutable_keys__: ClassVar[frozenset[str]]
225224
__total__: ClassVar[bool]
226225
__orig_bases__: ClassVar[tuple[Any, ...]]
226+
# PEP 705
227+
__readonly_keys__: ClassVar[frozenset[str]]
228+
__mutable_keys__: ClassVar[frozenset[str]]
229+
# PEP 728
230+
__closed__: ClassVar[bool]
231+
__extra_items__: ClassVar[Any]
227232
def copy(self) -> Self: ...
228233
# Using Never so that only calls using mypy plugin hook that specialize the signature
229234
# can go through.
@@ -501,3 +506,4 @@ class Doc:
501506
def __eq__(self, other: object) -> bool: ...
502507

503508
ReadOnly: _SpecialForm
509+
TypeIs: _SpecialForm

tests/stubtest_allowlists/py3_common.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -519,6 +519,9 @@ _typeshed.* # Utility types for typeshed, doesn't exist at runtime
519519
typing._SpecialForm.__call__
520520
typing._SpecialForm.__init__
521521

522+
# Should go away with a future version of stubtest
523+
typing_extensions\..*\.__non_callable_proto_members__
524+
522525
# Pretend typing.ByteString is a Union, to better match its documented semantics.
523526
# As a side effect, this changes the definition of collections.abc.ByteString, which is okay,
524527
# because it's not an ABC that makes any sense and was deprecated in 3.12

0 commit comments

Comments
 (0)