Skip to content

Commit 1a2dccf

Browse files
Fix stubtest tests on 3.14 (#19074)
The annotations-related ones are due to PEP 649/749. `__classdictcell__` is from PEP 695 (Python 3.12); not 100% sure what changed there.
1 parent 64b0a57 commit 1a2dccf

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

mypy/stubtest.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1494,6 +1494,7 @@ def verify_typealias(
14941494
"__loader__",
14951495
"__spec__",
14961496
"__annotations__",
1497+
"__annotate__",
14971498
"__path__", # mypy adds __path__ to packages, but C packages don't have it
14981499
"__getattr__", # resulting behaviour might be typed explicitly
14991500
# Created by `warnings.warn`, does not make much sense to have in stubs:
@@ -1510,6 +1511,9 @@ def verify_typealias(
15101511
# Special attributes
15111512
"__dict__",
15121513
"__annotations__",
1514+
"__annotate__",
1515+
"__annotations_cache__",
1516+
"__annotate_func__",
15131517
"__text_signature__",
15141518
"__weakref__",
15151519
"__hash__",
@@ -1518,6 +1522,7 @@ def verify_typealias(
15181522
"__vectorcalloffset__", # undocumented implementation detail of the vectorcall protocol
15191523
"__firstlineno__",
15201524
"__static_attributes__",
1525+
"__classdictcell__",
15211526
# isinstance/issubclass hooks that type-checkers don't usually care about
15221527
"__instancecheck__",
15231528
"__subclasshook__",

0 commit comments

Comments
 (0)