Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
194 commits
Select commit Hold shift + click to select a range
0c4185f
[WIP] Add initial nativeparse test case
JukkaL Oct 11, 2025
8c0f906
[WIP] First steps towards parsing something
JukkaL Oct 11, 2025
d5291be
Support multiple defs
JukkaL Oct 11, 2025
4c72241
Read line/column information
JukkaL Oct 12, 2025
3798d06
Remove debug print
JukkaL Oct 12, 2025
32d855e
Fix self check, update docstring
JukkaL Oct 12, 2025
cf9aefd
WIP add parse/deserialize benchmark
JukkaL Nov 22, 2025
9da3988
Update for new cache format
JukkaL Nov 23, 2025
c374e0a
Deserialize member expr
JukkaL Nov 23, 2025
46fe324
Add data-driven tests
JukkaL Nov 23, 2025
e8ce8f8
Fix empty line in test output
JukkaL Nov 23, 2025
bab774b
Deserialize tuple expressions
JukkaL Dec 29, 2025
ffd4b8d
Deserialize binary operations
JukkaL Dec 29, 2025
310a445
Deserialize int expressions
JukkaL Dec 29, 2025
2f92446
Deserialize assignment
JukkaL Dec 29, 2025
845ae1f
Deserialize if statement
JukkaL Dec 29, 2025
52ed3ac
Show informatino about panics in tests
JukkaL Dec 30, 2025
0681829
Deserialize additional node types
JukkaL Dec 30, 2025
8046eaf
Deserialize comparison and bool ops
JukkaL Dec 30, 2025
ddba816
Add deserialization test for None, True and False
JukkaL Dec 30, 2025
ce7e013
Deserialize func defs (partial) and return statements
JukkaL Dec 30, 2025
a92202c
Deserialize 'pass' and test func defs more
JukkaL Dec 30, 2025
4db2423
Deserialize parameter defaults
JukkaL Dec 30, 2025
2430f83
Deserialize keyword args in calls
JukkaL Dec 30, 2025
5cf0bef
Test *args and **kwargs in calls
JukkaL Dec 30, 2025
7ff2f48
Minimal deserialization of class defs
JukkaL Dec 30, 2025
7d50e25
Support base classes
JukkaL Dec 30, 2025
321c215
Deserialize floats
JukkaL Dec 30, 2025
4e27e8f
Deserialize unary expressions
JukkaL Dec 30, 2025
e5859df
Deserialize dict expressions
JukkaL Dec 30, 2025
b7b6943
Deserialize complex literals
JukkaL Dec 30, 2025
df5d22a
Deserialize slice expressions
JukkaL Dec 31, 2025
19e7be1
Partial support for deserializing function return types
JukkaL Dec 31, 2025
48635fa
Deserialize parameter types
JukkaL Dec 31, 2025
45f1862
Add test for qualified type names
JukkaL Dec 31, 2025
4ff1809
Test deserialization of generic types
JukkaL Dec 31, 2025
69e5b9f
Deserialize union types
JukkaL Dec 31, 2025
22f64e0
Deserialize assignment with type annotation
JukkaL Dec 31, 2025
2744a20
Deserialize import statements
JukkaL Dec 31, 2025
ff7e14b
Support raise
JukkaL Dec 31, 2025
dcedc1f
Support break and continue
JukkaL Dec 31, 2025
48d0379
Support generator expressions
JukkaL Dec 31, 2025
56ecbda
Support yield and yield from
JukkaL Dec 31, 2025
dc14c80
Support list and set comprehensions
JukkaL Dec 31, 2025
60a5aeb
Support dict comprehensions
JukkaL Jan 1, 2026
e35f8f5
Use the C extension in tests instead of subprocess
JukkaL Jan 1, 2026
fc1fc68
Support from ... import
JukkaL Jan 1, 2026
db7d848
Support assert statements
JukkaL Jan 1, 2026
1e0d162
Support 'for' statements
JukkaL Jan 1, 2026
badeb1a
Support 'with' statements
JukkaL Jan 1, 2026
9f7481f
Support function decorators (non-overloads)
JukkaL Jan 1, 2026
acba8bb
Fix self check
JukkaL Jan 1, 2026
2d698a9
Support operator assignment
JukkaL Jan 1, 2026
ad21b78
Support try statements
JukkaL Jan 1, 2026
8d797d6
Fix test
JukkaL Jan 1, 2026
da7e92f
Support ellipsis expressions
JukkaL Jan 1, 2026
dbffbf1
Support 'if' expressions
JukkaL Jan 1, 2026
558181c
Support type list
JukkaL Jan 1, 2026
7853cc1
Support ellipsis types
JukkaL Jan 1, 2026
66d0cd1
Support del statements
JukkaL Jan 2, 2026
ac8fca5
Minimal support for f-strings
JukkaL Jan 2, 2026
363b0df
Support f-string conversion flags
JukkaL Jan 2, 2026
1902bc5
Support f-string format specs and optimize simple f-strings
JukkaL Jan 2, 2026
1ea538e
Add f-string test case
JukkaL Jan 2, 2026
b396a3d
Optimize more simple cases
JukkaL Jan 2, 2026
cf538c6
Fix string literals mixed with f-strings
JukkaL Jan 2, 2026
05fa03e
Support lambda expressions
JukkaL Jan 2, 2026
a72892a
Support assignment expressions (:=)
JukkaL Jan 2, 2026
7360a99
Support star expressions
JukkaL Jan 2, 2026
dc6eab3
Support bytes literals
JukkaL Jan 2, 2026
1ee58dd
Support 'global' and 'nonlocal' statements
JukkaL Jan 2, 2026
3ceb623
Support await expressions
JukkaL Jan 2, 2026
a4ab43c
Support bool literal types
JukkaL Jan 2, 2026
b5d73eb
Handle syntax errors
JukkaL Jan 2, 2026
34b76f4
Refactor: split statement parsing in read_statement
JukkaL Jan 3, 2026
a510e5a
Support overloaded functions (no tests yet)
JukkaL Jan 3, 2026
b9a63f6
Simplify
JukkaL Jan 3, 2026
acaee8c
Deserialize function parameter locations
JukkaL Jan 3, 2026
8a7c78b
Refactor function parameter deserialization
JukkaL Jan 3, 2026
8aa6bf0
Improve decorators
JukkaL Jan 3, 2026
ac18a2b
Fix decorator locations and add overload test cases
JukkaL Jan 3, 2026
9445336
Basic support for type ignore comments
JukkaL Jan 3, 2026
e2b3b4a
Fix self check
JukkaL Jan 3, 2026
204e664
Support big integers
JukkaL Jan 4, 2026
77e10cb
Support metaclass in class defs
JukkaL Jan 5, 2026
85c94c3
Support arbitrary class def keywords
JukkaL Jan 5, 2026
77288a5
Support unpack types
JukkaL Jan 5, 2026
2b89afb
Support int literal types
JukkaL Jan 5, 2026
cd30492
Add negative int literal type test
JukkaL Jan 5, 2026
5a620d0
Replace non-ascii character in test
JukkaL Jan 7, 2026
bbe0164
Support star imports
JukkaL Jan 7, 2026
0bd02e1
Support class decorators
JukkaL Jan 7, 2026
545f611
Support string literal types
JukkaL Jan 10, 2026
b6cc04a
Support bytes literal types
JukkaL Jan 10, 2026
2a2d4e9
Add skip_function_bodies param
JukkaL Jan 17, 2026
5191a54
Add strip function bodies tests (can't run them yet properly)
JukkaL Jan 17, 2026
a6d9ada
Support skipping function bodies in the test runner
JukkaL Jan 17, 2026
b7c91e3
Fix empty blocks
JukkaL Jan 17, 2026
afc93b1
Add --native-parser flags (unused for now)
JukkaL Jan 17, 2026
2072f9e
WIP: basic integration of native parser
JukkaL Jan 17, 2026
661dbe8
Strip function bodies if errors are ignored
JukkaL Jan 17, 2026
387f1f2
Report syntax errors
JukkaL Jan 17, 2026
937a67e
Fix class keywords
JukkaL Jan 17, 2026
999dcfc
Fix overloads
JukkaL Jan 17, 2026
075788c
Support super() expressions
JukkaL Jan 18, 2026
6317d63
Add support for callable types (still missing error handling)
JukkaL Jan 18, 2026
a2f8485
Support positional-only arguments
JukkaL Jan 18, 2026
8e76879
Add some type comment tests (simple cases only)
JukkaL Jan 18, 2026
c400120
Support async with and async for
JukkaL Jan 18, 2026
103ecd5
Added nested list assignment test
JukkaL Jan 18, 2026
0a5373b
Add test case for legacy parser
JukkaL Jan 19, 2026
31d5660
Make --native-parser affect cache
JukkaL Jan 19, 2026
49216b4
WIP return empty file for directory
JukkaL Jan 19, 2026
7232133
WIP TEMPORARY ignore some errors caused be native parser issues
JukkaL Jan 19, 2026
a949c69
WIP HAX allow parsing without file name
JukkaL Jan 19, 2026
69e73ac
TEMPORARY: turn on native parser by default
JukkaL Jan 19, 2026
0f56995
Fix elif ast structure
JukkaL Jan 19, 2026
8cdcc61
WIP Ignore
JukkaL Jan 19, 2026
fcfecce
Revert "TEMPORARY: turn on native parser by default"
JukkaL Jan 24, 2026
3dabbd0
Fix decorated functions
JukkaL Jan 24, 2026
43fc602
Revert some ignores
JukkaL Jan 24, 2026
1e09832
Lint
JukkaL Jan 24, 2026
85c335f
Add additional syntax error tests
JukkaL Jan 24, 2026
89d6def
Adjust type ignore
JukkaL Jan 24, 2026
010b443
Add test for error conditions
JukkaL Jan 25, 2026
4a93c7f
Propagate state param through parse functions
JukkaL Jan 25, 2026
e7fb3e3
Add syntax error test case
JukkaL Jan 25, 2026
89e1ec2
Check callable expression types for errors
JukkaL Jan 25, 2026
0b56ba7
Support invalid type annotations
JukkaL Jan 25, 2026
d57da8d
Remove temporary test case
JukkaL Jan 25, 2026
b7a9b76
Update function param Var node compatibility
JukkaL Jan 25, 2026
05716ea
Set more function type annotation attributes
JukkaL Jan 25, 2026
05f51f3
Make special dunder params positional only
JukkaL Jan 26, 2026
ab52bae
FIXME enable --native-parser in testcheck.py
JukkaL Jan 27, 2026
e0cba2d
[old parser] Add some conditional overload tests
JukkaL Jan 31, 2026
74d5877
Add helpers
JukkaL Jan 31, 2026
35ee1d3
Update native_parse to accept Options
JukkaL Jan 31, 2026
9558665
Add helper from fastparse.py
JukkaL Jan 31, 2026
103ecc4
Add helper functions
JukkaL Jan 31, 2026
c0d7289
Add fix_function_overloads from fastparse.py
JukkaL Jan 31, 2026
e89ddf7
Fix conditional overload items
JukkaL Jan 31, 2026
425152d
Make some errors non-blocking
JukkaL Jan 31, 2026
e725ca6
Support --implicit-optional
JukkaL Jan 31, 2026
7dc2f8d
Update legacy parse tests to pass by adding Keywords
JukkaL Jan 31, 2026
caf5159
Add legacy parser match statement tests
JukkaL Jan 31, 2026
305b6d3
Deserialize match statements
JukkaL Jan 31, 2026
ceb6c54
WIP PEP 695
JukkaL Jan 31, 2026
548fb1e
Support except*
JukkaL Feb 1, 2026
c68d176
Fix * syntax
JukkaL Feb 1, 2026
cf786f1
Revert "Add legacy parser match statement tests"
JukkaL Feb 2, 2026
e454453
Ignore serialized imports
JukkaL Feb 7, 2026
21f27a0
Add function to deserialize out of band imports (currently unused)
JukkaL Feb 7, 2026
17455ac
Use serialized import metadata
JukkaL Feb 7, 2026
82c448c
Remove now unused ImportCollector
JukkaL Feb 7, 2026
cee5597
Fix self check
JukkaL Feb 7, 2026
17bcce5
Test import serialization/deserialization
JukkaL Feb 7, 2026
0f37b17
Deserialize block reachability
JukkaL Feb 7, 2026
76f6a32
Add reachability tests
JukkaL Feb 7, 2026
0deb566
Add reachability tests
JukkaL Feb 7, 2026
e09c3c2
Fixes to import serialization
JukkaL Feb 8, 2026
363a70a
Fix conditional overloads
JukkaL Feb 8, 2026
3945f7d
Lint
JukkaL Feb 8, 2026
c6bc1af
Simplify redundant tests
JukkaL Feb 8, 2026
eb72dbf
Pass Python version to ast_serialize (fixes self check)
JukkaL Feb 10, 2026
f2e4706
Merge branch 'master' into new-parser
JukkaL Feb 15, 2026
ae963f0
Skip native parser tests if ast_serialize is not installed
JukkaL Feb 15, 2026
46f810d
Cleanup: Remove temporary benchmark tests
JukkaL Feb 15, 2026
83914fd
Fix failing native parser test
JukkaL Feb 15, 2026
9e1f65d
Fix test case
JukkaL Feb 15, 2026
95319e3
Refactor line/column range set
JukkaL Feb 15, 2026
60f733c
Add note about ast_serialize repo
JukkaL Feb 15, 2026
7ccf14f
Remove some low-value comments from mypy.nativeparse
JukkaL Feb 15, 2026
fd23cb8
Use native parser in testcheck.py only if env variable TEST_NATIVE_PA…
JukkaL Feb 15, 2026
98d9a1b
Lint
JukkaL Feb 15, 2026
3e87c1a
Update semantic analyzer test outputs
JukkaL Feb 15, 2026
840bd1e
Fix class keywords in tree transform
JukkaL Feb 15, 2026
144f6d6
Fix an obvious ordering bug to correctly set line
ilevkivskyi Feb 18, 2026
67ff2e5
Always allow new union syntax inside strings/comments
ilevkivskyi Feb 18, 2026
4270ff8
Couple tuple-related fixes (#20840)
ilevkivskyi Feb 18, 2026
3756c17
Detect partial stub packages (#20844)
ilevkivskyi Feb 18, 2026
854eea8
Add support for inline TypedDicts (#20847)
ilevkivskyi Feb 19, 2026
fa08d89
Fix couple more edge cases type comments/strings (#20848)
ilevkivskyi Feb 19, 2026
3869d79
Update docstring
JukkaL Feb 21, 2026
512bf15
Remove test cases that aren't useful any more
JukkaL Feb 21, 2026
9c2ca82
Update comments
JukkaL Feb 21, 2026
f7926c1
Remove type ignore that isn't needed any more
JukkaL Feb 21, 2026
f09d7ba
Fix self check
JukkaL Feb 21, 2026
ca7d19d
Lint
JukkaL Feb 21, 2026
61478c2
Add reachability tests
JukkaL Feb 21, 2026
99da49b
Update docstring
JukkaL Feb 21, 2026
659ecbf
Add docstring and reorganize functions
JukkaL Feb 21, 2026
8b31855
Move some type read functions to be close to each other
JukkaL Feb 21, 2026
0017e18
Clean up test code
JukkaL Feb 21, 2026
11d04c6
Merge branch 'master' into new-parser
JukkaL Feb 21, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions mypy/cache.py
Original file line number Diff line number Diff line change
Expand Up @@ -266,6 +266,8 @@ def read(cls, data: ReadBuffer, data_file: str) -> CacheMeta | None:
# Misc classes.
EXTRA_ATTRS: Final[Tag] = 150
DT_SPEC: Final[Tag] = 151
# Four integers representing source file (line, column) range.
LOCATION: Final[Tag] = 152

END_TAG: Final[Tag] = 255

Expand Down
2 changes: 2 additions & 0 deletions mypy/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -1245,6 +1245,8 @@ def add_invertible_flag(
# --local-partial-types disallows partial types spanning module top level and a function
# (implicitly defined in fine-grained incremental mode)
add_invertible_flag("--local-partial-types", default=False, help=argparse.SUPPRESS)
# --native-parser enables the native parser (experimental)
add_invertible_flag("--native-parser", default=False, help=argparse.SUPPRESS)
# --logical-deps adds some more dependencies that are not semantically needed, but
# may be helpful to determine relative importance of classes and functions for overall
# type precision in a code base. It also _removes_ some deps, so this flag should be never
Expand Down
Loading