lark breaking changes
lark 1.0.0 (November 15, 2021) is its newest release with breaking changes, 37 of them. The first: lark 1.0.0 drops support for Python 2 and requires Python 3.6 or later. Every breaking API change we have recorded in lark on PyPI: 65 breaking changes in 3 versions. Below, its 3 versions with breaking changes, newest first, removals and renames first, each with its source.
Updated December 4, 2026
On this page
Latest version 1.3.1, released October 27, 2025.
Its 1.0.0 release requires Python 3.6 or later. Python end of life dates.
- From 0.12.0 to 1.0.0: 37 breaking changes in 1 version.
- From 0.11.0 to 1.0.0: 51 breaking changes in 2 versions.
lark 1.0.0 breaking changes
- Removed
Lark no longer supports Python 2. Code running on Python 2 must move to Python 3.6 or later. github.com - Renamed
Install the package with pip install lark. The lark-parser name is no longer the install target. github.com - Renamed
'standard'
Use the 'basic' lexer option in place of 'standard'. github.com - Renamed
TraditionalLexer
Replace uses of TraditionalLexer with BasicLexer. github.com - Behavior changed
Discard
Code that raises Discard as an exception must return it instead. github.com - Default changed
maybe_placeholders
Code that relied on the old default must now pass maybe_placeholders explicitly if it needs the previous behavior. github.com - Default changed
priority
Terminals no longer default to priority 1; the default is 0 for both terminals and rules. github.com - Default changed
UnexpectedInput.match_examples
The use_accepts argument of match_examples now defaults to True, so code relying on the old default must pass it explicitly. github.com - Signature changed
lark.ABC
Was class ABC(object); now from lark.lark import ABC. pypi.org - Signature changed
lark.Discard
Was class Discard(Exception); now Discard. pypi.org - Signature changed
lark.indenter.Indenter
Was class Indenter(PostLex); now class Indenter(PostLex, ABC). pypi.org - Signature changed
lark.Interpreter
Was class Interpreter(_Decoratable); now class Interpreter(_Decoratable, ABC, Generic[_T]). pypi.org - Signature changed
lark.lark.PackageResource
Was class PackageResource(object); now PackageResource. pypi.org - Signature changed
lark.Lark.save
Was def save(self, f); now def save(self, f, exclude_options: Collection[str] = ()). pypi.org - Signature changed
lark.Lexer
Was class Lexer(object); now class Lexer(ABC). pypi.org - Signature changed
lark.Lexer.lex
Was lex: Callable[..., Iterator[Token]]; now def lex(self, lexer_state: LexerState, parser_state: Any) -> Iterator[Token]. pypi.org - Signature changed
lark.lexer.LexerConf
Was class LexerConf; now class LexerConf(Serialize). pypi.org - Signature changed
lark.lexer.TraditionalLexer.lex
Was def lex(self, state, parser_state) -> Iterator[Token]; now def lex(self, stream: str) -> Iterator[Token]. pypi.org - Signature changed
lark.lexer.TraditionalLexer.match
Was def match(self, text, pos: int) -> Optional[Tuple[str, str]]; now def match(self, stream: str, pos: int) -> Optional[Tuple[str, str]]. pypi.org - Signature changed
lark.parser_frontends.MakeParsingFrontend
Was class MakeParsingFrontend; now class MakeParsingFrontend(MakeParsingFrontend). pypi.org - Signature changed
lark.parsers.earley.Parser.__init__
Was def __init__(self, parser_conf, term_matcher, resolve_ambiguity=True, debug=False, tree_class=Tree); now def __init__(self, lexer_conf, parser_conf, term_matcher, resolve_ambiguity=True, debug=False, tree_class=Tree). pypi.org - Signature changed
lark.parsers.lalr_puppet.ImmutableParserPuppet
Was ImmutableParserPuppet; now from lark.parsers.lalr_interactive_parser import ImmutableParserPuppet. pypi.org - Signature changed
lark.parsers.lalr_puppet.ParserPuppet
Was ParserPuppet; now from lark.parsers.lalr_interactive_parser import ParserPuppet. pypi.org - Signature changed
lark.parsers.xearley.Parser.__init__
Was def __init__(self, parser_conf, term_matcher, resolve_ambiguity=True, ignore=(), complete_lex=False, debug=False, tree_class=Tree); now def __init__(self, lexer_conf, parser_conf, term_matcher, resolve_ambiguity=True... pypi.org - Signature changed
lark.Pattern
Was class Pattern(Serialize); now class Pattern(Serialize, ABC). pypi.org - Signature changed
lark.Pattern.max_width
Was def max_width(self); now max_width: int. pypi.org - Signature changed
lark.Pattern.min_width
Was def min_width(self); now min_width: int. pypi.org - Signature changed
lark.suppress
Was def suppress(*excs); now from lark.load_grammar import suppress. pypi.org - Signature changed
lark.TerminalDef.__init__
Was def __init__(self, name: str, pattern: Pattern, priority: int = 1) -> None; now def __init__(self, name: str, pattern: Pattern, priority: int = TOKEN_DEFAULT_PRIORITY) -> None. pypi.org - Signature changed
lark.Token
Was class Token(Str); now class Token(str). pypi.org - Signature changed
lark.Token.__new__
Was def __new__(cls, type_, value, start_pos=None, line=None, column=None, end_line=None, end_column=None, end_pos=None, pos_in_stream=None); now def __new__(cls, type_, value, start_pos=None, line=None, column=None, end_line=None... pypi.org - Signature changed
lark.tools.nearley.NearleyToLark
Was class NearleyToLark(InlineTransformer); now class NearleyToLark(Transformer). pypi.org - Signature changed
lark.Transformer
Was class Transformer(_Decoratable); now class Transformer(_Decoratable, ABC, Generic[_T]). pypi.org - Signature changed
lark.TransformerChain
Was class TransformerChain(object); now class TransformerChain(Generic[_T]). pypi.org - Signature changed
lark.UnexpectedInput.match_examples
Was def match_examples(self, parse_fn: Callable[[str], Tree], examples: Union[Dict[T, Iterable[str]], Iterable[Tuple[T, Iterable[str]]]], token_type_match_fallback: bool = False, use_accepts: bool = False) -> T; now def... pypi.org - Signature changed
lark.Visitor
Was class Visitor(VisitorBase); now class Visitor(VisitorBase, ABC, Generic[_T]). pypi.org - Signature changed
v_args
With meta=True, callbacks now receive (meta, children) instead of the previous argument order. github.com
lark 0.12.0 breaking changes
- Signature changed
lark.ast_utils.create_transformer
Was def create_transformer(ast_module: types.ModuleType, transformer: Optional[Transformer] = None) -> Transformer; now def create_transformer(ast_module: types.ModuleType, transformer: Optional[Transformer] = None... pypi.org - Signature changed
lark.LarkOptions.propagate_positions
Was propagate_positions: bool; now propagate_positions: Union[bool, Callable]. pypi.org - Signature changed
lark.parse_tree_builder.PropagatePositions.__init__
Was def __init__(self, node_builder); now def __init__(self, node_builder, node_filter=None). pypi.org - Signature changed
lark.parser_frontends.MakeParsingFrontend.deserialize
Was @classmethod def deserialize(cls, data, memo, lexer_conf, callbacks, options); now def deserialize(self, data, memo, lexer_conf, callbacks, options). pypi.org - Signature changed
lark.parsers.earley_forest.ForestToParseTree.__init__
Was def __init__(self, tree_class=Tree, callbacks=dict(), prioritizer=ForestSumVisitor(), resolve_ambiguity=True); now def __init__(self, tree_class=Tree, callbacks=dict(), prioritizer=ForestSumVisitor(), resolve_ambiguity=True... pypi.org - Signature changed
lark.parsers.earley_forest.TreeForestTransformer.__init__
Was def __init__(self, tree_class=Tree, prioritizer=ForestSumVisitor(), resolve_ambiguity=True); now def __init__(self, tree_class=Tree, prioritizer=ForestSumVisitor(), resolve_ambiguity=True, use_cache=False). pypi.org - Signature changed
lark.reconstruct.Reconstructor.reconstruct
Was def reconstruct(self, tree: Tree, postproc: Callable[[Iterable[str]], Iterable[str]] = None) -> str; now def reconstruct(self, tree: Tree, postproc: Callable[[Iterable[str]], Iterable[str]] = None, insert_spaces: bool = True) -> str. pypi.org - Signature changed
lark.TerminalTreeToPattern
Was class TerminalTreeToPattern(Transformer); now class TerminalTreeToPattern(Transformer_NonRecursive). pypi.org - Signature changed
lark.TerminalTreeToPattern.transform
Was def transform(self, tree: Tree) -> _T; now def transform(self, tree). pypi.org - Signature changed
lark.Token.__init__
Was def __init__(self, type_: str, value: Any, pos_in_stream: int = None, line: int = None, column: int = None, end_line: int = None, end_column: int = None, end_pos: int = None) -> None; now def __init__(self, type_: str, value: Any... pypi.org
And 4 more in this version. Sign up to see every change
lark 0.11.0 breaking changes
- Behavior changed
cache
With cache=True, Lark now uses a temporary directory instead of the working directory. Code that expects cache files in the working directory must change. github.com - Signature changed
lark.ContextualLexer.lex
Was def lex(self, stream: str, get_parser_state: Callable[[], str]) -> Iterator[Token]; now def lex(self, lexer_state, parser_state) -> Iterator[Token]. pypi.org - Signature changed
lark.exceptions.ParserPuppet.__init__
Was def __init__(self, parser, state_stack, value_stack, start, stream, set_state); now def __init__(self, parser, parser_state, lexer_state). pypi.org - Signature changed
lark.Lark.grammar_source
Was grammar_source: str; now grammar_source. pypi.org - Signature changed
lark.lark.load_grammar
Was def load_grammar(grammar, source, re_, global_keep_all_tokens); now def load_grammar(grammar, source, import_paths, global_keep_all_tokens). pypi.org - Signature changed
lark.Lark.source
Was source: str; now source. pypi.org - Signature changed
lark.load_grammar.GrammarLoader.__init__
Was def __init__(self, re_module, global_keep_all_tokens); now def __init__(self, global_keep_all_tokens). pypi.org - Signature changed
lark.load_grammar.GrammarLoader.import_grammar
Was def import_grammar(self, grammar_path, base_paths=[]); now def import_grammar(self, grammar_path, base_path=None, import_paths=[]). pypi.org - Signature changed
lark.load_grammar.GrammarLoader.load_grammar
Was def load_grammar(self, grammar_text, grammar_name='<?>'); now def load_grammar(self, grammar_text, grammar_name='<?>', import_paths=[]). pypi.org - Signature changed
lark.load_grammar.load_grammar
Was def load_grammar(grammar, source, re_, global_keep_all_tokens); now def load_grammar(grammar, source, import_paths, global_keep_all_tokens). pypi.org
And 4 more in this version. Sign up to see every change
Check your code
These are the changes. To see which of them reach your code, scan a public repository, or have your coding agent call check_code with your manifest or lockfile over MCP. The API reads every change in every version. A fix pull request opens for the changes that reach a connected repository. Nothing merges or deploys.

Put your code on continuous maintenance.
Scan a public repository now, or give your agent one line.
See how out of date your code is.
Tell your agent what changed since it was trained.
claude mcp add --transport http since https://api.since.dev/mcpCodex, Cursor and any MCP client use https://api.since.dev/mcp.