Bug 2353123 - sympy fails to build with Python 3.14: lark.exceptions.GrammarError: Using an undefined rule: NonTerminal('latex_string')
Summary: sympy fails to build with Python 3.14: lark.exceptions.GrammarError: Using an...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: sympy
Version: rawhide
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Jerry James
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks: PYTHON3.14
TreeView+ depends on / blocked
 
Reported: 2025-03-18 09:45 UTC by Karolina Surma
Modified: 2025-03-18 17:02 UTC (History)
6 users (show)

Fixed In Version: sympy-1.13.3-4.fc43
Clone Of:
Environment:
Last Closed: 2025-03-18 17:02:55 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Karolina Surma 2025-03-18 09:45:18 UTC
sympy fails to build with Python 3.14.0a6.

_________________________________ test_custom1 _________________________________
[gw2] linux -- Python 3.14.0 /usr/bin/python3
sympy/parsing/tests/test_custom_latex.py:41: in test_custom1
    parser = init_custom_parser(modification1)
sympy/parsing/tests/test_custom_latex.py:34: in init_custom_parser
    parser = LarkLaTeXParser(grammar_file=f.name, transformer=transformer)
sympy/parsing/latex/lark/latex_parser.py:52: in __init__
    self.parser = _lark.Lark(
/usr/lib/python3.14/site-packages/lark/lark.py:439: in __init__
    self.parser = self._build_parser()
/usr/lib/python3.14/site-packages/lark/lark.py:485: in _build_parser
    return _construct_parsing_frontend(
/usr/lib/python3.14/site-packages/lark/parser_frontends.py:257: in _construct_parsing_frontend
    return ParsingFrontend(lexer_conf, parser_conf, options)
/usr/lib/python3.14/site-packages/lark/parser_frontends.py:61: in __init__
    self.parser = create_parser(lexer_conf, parser_conf, options)
/usr/lib/python3.14/site-packages/lark/parser_frontends.py:215: in create_earley_parser
    return f(lexer_conf, parser_conf, resolve_ambiguity=resolve_ambiguity,
/usr/lib/python3.14/site-packages/lark/parser_frontends.py:193: in create_earley_parser__dynamic
    return xearley.Parser(lexer_conf, parser_conf, earley_matcher.match, **kw)
/usr/lib/python3.14/site-packages/lark/parsers/xearley.py:34: in __init__
    BaseParser.__init__(self, lexer_conf, parser_conf, term_matcher, resolve_ambiguity,
/usr/lib/python3.14/site-packages/lark/parsers/earley.py:35: in __init__
    analysis = GrammarAnalyzer(parser_conf)
/usr/lib/python3.14/site-packages/lark/parsers/grammar_analysis.py:158: in __init__
    raise GrammarError("Using an undefined rule: %s" % sym)
E   lark.exceptions.GrammarError: Using an undefined rule: NonTerminal('latex_string')
_________________________________ test_custom2 _________________________________
[gw2] linux -- Python 3.14.0 /usr/bin/python3
sympy/parsing/tests/test_custom_latex.py:58: in test_custom2
    parser = init_custom_parser(modification2, CustomTransformer)
sympy/parsing/tests/test_custom_latex.py:34: in init_custom_parser
    parser = LarkLaTeXParser(grammar_file=f.name, transformer=transformer)
sympy/parsing/latex/lark/latex_parser.py:52: in __init__
    self.parser = _lark.Lark(
/usr/lib/python3.14/site-packages/lark/lark.py:439: in __init__
    self.parser = self._build_parser()
/usr/lib/python3.14/site-packages/lark/lark.py:485: in _build_parser
    return _construct_parsing_frontend(
/usr/lib/python3.14/site-packages/lark/parser_frontends.py:257: in _construct_parsing_frontend
    return ParsingFrontend(lexer_conf, parser_conf, options)
/usr/lib/python3.14/site-packages/lark/parser_frontends.py:61: in __init__
    self.parser = create_parser(lexer_conf, parser_conf, options)
/usr/lib/python3.14/site-packages/lark/parser_frontends.py:215: in create_earley_parser
    return f(lexer_conf, parser_conf, resolve_ambiguity=resolve_ambiguity,
/usr/lib/python3.14/site-packages/lark/parser_frontends.py:193: in create_earley_parser__dynamic
    return xearley.Parser(lexer_conf, parser_conf, earley_matcher.match, **kw)
/usr/lib/python3.14/site-packages/lark/parsers/xearley.py:34: in __init__
    BaseParser.__init__(self, lexer_conf, parser_conf, term_matcher, resolve_ambiguity,
/usr/lib/python3.14/site-packages/lark/parsers/earley.py:35: in __init__
    analysis = GrammarAnalyzer(parser_conf)
/usr/lib/python3.14/site-packages/lark/parsers/grammar_analysis.py:158: in __init__
    raise GrammarError("Using an undefined rule: %s" % sym)
E   lark.exceptions.GrammarError: Using an undefined rule: NonTerminal('latex_string')

https://docs.python.org/3.14/whatsnew/3.14.html

For the build logs, see:
https://copr-be.cloud.fedoraproject.org/results/@python/python3.14/fedora-rawhide-x86_64/08783586-sympy/

For all our attempts to build sympy with Python 3.14, see:
https://copr.fedorainfracloud.org/coprs/g/python/python3.14/package/sympy/

Testing and mass rebuild of packages is happening in copr.
You can follow these instructions to test locally in mock if your package builds with Python 3.14:
https://copr.fedorainfracloud.org/coprs/g/python/python3.14/

Let us know here if you have any questions.

Python 3.14 is planned to be included in Fedora 43.
To make that update smoother, we're building Fedora packages with all pre-releases of Python 3.14.
A build failure prevents us from testing all dependent packages (transitive [Build]Requires),
so if this package is required a lot, it's important for us to get it fixed soon.

We'd appreciate help from the people who know this package best,
but if you don't want to work on this now, let us know so we can try to work around it on our side.

Comment 1 Fedora Update System 2025-03-18 16:58:20 UTC
FEDORA-2025-85da926827 (sympy-1.13.3-4.fc43) has been submitted as an update to Fedora 43.
https://bodhi.fedoraproject.org/updates/FEDORA-2025-85da926827

Comment 2 Fedora Update System 2025-03-18 17:02:55 UTC
FEDORA-2025-85da926827 (sympy-1.13.3-4.fc43) has been pushed to the Fedora 43 stable repository.
If problem still persists, please make note of it in this bug report.


Note You need to log in before you can comment on or make changes to this bug.