DeprecationWarning: ast.NameConstant is deprecated and will be removed in Python 3.14

73 views
Skip to first unread message

Hannes Lynchburg

unread,
Nov 4, 2024, 2:26:56 AM11/4/24
to reportlab-users
Hello everyone,

while running tests with pytest for my project using reportlab I get the following warning:

/.venv/lib/python3.12/site-packages/reportlab/lib/rl_safe_eval.py:12: DeprecationWarning: ast.NameConstant is deprecated and will be removed in Python 3.14; use ast.Constant instead
haveNameConstant = hasattr(ast,'NameConstant')

So it seems like this part of the code will stop working with Python 3.14. I think a fix should be pretty easy.

Thanks for developing this library!
Reply all
Reply to author
Forward
0 new messages