Skip to content

Commit 9e2d061

Browse files
authored
Bump ast-serialize cache version (#21388)
This mostly affects mypyc.
1 parent 0d118cc commit 9e2d061

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

mypy/nativeparse.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -271,7 +271,7 @@ def parse_to_binary_ast(
271271
platform=options.platform,
272272
always_true=options.always_true,
273273
always_false=options.always_false,
274-
cache_version=2,
274+
cache_version=3,
275275
)
276276
return (
277277
ast_bytes,
@@ -376,7 +376,7 @@ def read_statement(state: State, data: ReadBuffer) -> Statement:
376376
names.append((name, asname))
377377

378378
stmt = ImportFrom(module_id, relative, names)
379-
read_loc(data, stmt)
379+
_read_and_set_import_metadata(data, stmt)
380380
expect_end_tag(data)
381381
return stmt
382382
elif tag == nodes.FOR_STMT:
@@ -435,7 +435,7 @@ def read_statement(state: State, data: ReadBuffer) -> Statement:
435435
asname = None
436436
ids.append((name, asname))
437437
stmt = Import(ids)
438-
read_loc(data, stmt)
438+
_read_and_set_import_metadata(data, stmt)
439439
expect_end_tag(data)
440440
return stmt
441441
elif tag == nodes.RAISE_STMT:
@@ -519,7 +519,7 @@ def read_statement(state: State, data: ReadBuffer) -> Statement:
519519
relative = read_int(data)
520520

521521
stmt = ImportAll(module_id, relative)
522-
read_loc(data, stmt)
522+
_read_and_set_import_metadata(data, stmt)
523523
expect_end_tag(data)
524524
return stmt
525525
elif tag == nodes.NONLOCAL_DECL:

0 commit comments

Comments
 (0)