From a5a8422e71563ab2288491152b0078769982f3c7 Mon Sep 17 00:00:00 2001 From: Jelle Zijlstra Date: Sun, 11 May 2025 16:14:36 -0700 Subject: [PATCH] Fix stubtest tests on 3.14 --- mypy/stubtest.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/mypy/stubtest.py b/mypy/stubtest.py index 733504e8c234b..39b27a1f1ed32 100644 --- a/mypy/stubtest.py +++ b/mypy/stubtest.py @@ -1494,6 +1494,7 @@ def verify_typealias( "__loader__", "__spec__", "__annotations__", + "__annotate__", "__path__", # mypy adds __path__ to packages, but C packages don't have it "__getattr__", # resulting behaviour might be typed explicitly # Created by `warnings.warn`, does not make much sense to have in stubs: @@ -1510,6 +1511,9 @@ def verify_typealias( # Special attributes "__dict__", "__annotations__", + "__annotate__", + "__annotations_cache__", + "__annotate_func__", "__text_signature__", "__weakref__", "__hash__", @@ -1518,6 +1522,7 @@ def verify_typealias( "__vectorcalloffset__", # undocumented implementation detail of the vectorcall protocol "__firstlineno__", "__static_attributes__", + "__classdictcell__", # isinstance/issubclass hooks that type-checkers don't usually care about "__instancecheck__", "__subclasshook__",