Skip to content

Commit 66b48cb

Browse files
Fix stubgen for Python 3.13 (#17290)
__firstlineno__ and __static_attributes__ are new in 3.13. __annotate__ will be new in 3.14, so we might as well add it now. I tried to run the test suite on 3.13. There are a ton of compilation failures from mypyc, and a number of stubgen failures that this PR will fix.
1 parent 3ddc009 commit 66b48cb

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

mypy/stubgenc.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -466,6 +466,9 @@ def is_skipped_attribute(self, attr: str) -> bool:
466466
"__module__",
467467
"__weakref__",
468468
"__annotations__",
469+
"__firstlineno__",
470+
"__static_attributes__",
471+
"__annotate__",
469472
)
470473
or attr in self.IGNORED_DUNDERS
471474
or is_pybind_skipped_attribute(attr) # For pickling

0 commit comments

Comments
 (0)