Skip to content

LstGen funktioniert nicht mehr mit Python 3.14 #37

@Mape6

Description

@Mape6

Hi Jenner,

vielen Dank erstmal für dein tolles Tool!

Leider ist LstGen noch nicht bereit für Python 3.14. Ich erhalte folgende Fehlermeldung:

lstgen -p 2025_1 -l python --class-name Lohnsteuer2025 --outfile lst2025.py
/home/Python/lstgen/venv/lib/python3.14/site-packages/urllib3/connectionpool.py:1097: InsecureRequestWarning: Unverified HTTPS request is being made to host 'www.bmf-steuerrechner.de'. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.io/en/latest/advanced-usage.html#tls-warnings
warnings.warn(
Traceback (most recent call last):
File "/home/Python/lstgen/venv/bin/lstgen", line 7, in
sys.exit(main())
~~~~^^
File "/home/Python/lstgen/venv/lib/python3.14/site-packages/lstgen/cli.py", line 175, in main
generator.generate()
~~~~~~~~~~~~~~~~~~^^
File "/home/Python/lstgen/venv/lib/python3.14/site-packages/lstgen/generators/python/init.py", line 61, in generate
converted = self.convert_to_python(value)
File "/home/Python/lstgen/venv/lib/python3.14/site-packages/lstgen/generators/python/init.py", line 178, in convert_to_python
return ''.join(self.to_code(node))
~~~~~~~~~~~~^^^^^^
File "/home/Python/lstgen/venv/lib/python3.14/site-packages/lstgen/generators/ast2code.py", line 217, in to_code
if isinstance(node, ast.Num):
^^^^^^^
AttributeError: module 'ast' has no attribute 'Num'

Die Funktion ast.Num ist seit Python 3.8 deprecated und wurde mit 3.14 entfernt:
https://docs.python.org/3/library/ast.html

Deprecated since version 3.8, removed in version 3.14: Previous versions of Python provided the AST classes ast.Num, ast.Str, ast.Bytes, ast.NameConstant and ast.Ellipsis, which were deprecated in Python 3.8. These classes were removed in Python 3.14, and their functionality has been replaced with ast.Constant.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions