xraypy/xraylarch

[0.9.74] DeprecationWarning: ast.Num is deprecated and will be removed in Python 3.14; use ast.Constant instead

Opened this issue · 0 comments

Hello,

I am still doing some packaging effort, now while running the test I got these warnings for te upcomming Python 3.14

Cheers

=============================== warnings summary ===============================
tests/test_basic_processing.py::TestEval::test_astdump
tests/test_basic_processing.py::TestEval::test_astdump
  /tmp/autopkgtest.Jzb2kz/autopkgtest_tmp/tests/test_basic_processing.py:503: DeprecationWarning: ast.Num is deprecated and will be removed in Python 3.14; use ast.Constant instead
    self.assertTrue(isinstance(astnode.body[0].value, ast.Num))

tests/test_basic_processing.py::TestEval::test_astdump
  /tmp/autopkgtest.Jzb2kz/autopkgtest_tmp/tests/test_basic_processing.py:505: DeprecationWarning: Attribute n is deprecated and will be removed in Python 3.14; use value instead
    self.assertTrue(astnode.body[0].value.n == 1)

tests/test_funccalls.py: 6 warnings
tests/test_interpreter.py: 5 warnings
  /usr/lib/python3/dist-packages/larch/interpreter.py:1000: DeprecationWarning: ast.Str is deprecated and will be removed in Python 3.14; use ast.Constant instead
    isinstance(node.body[0].value, ast.Str)):

tests/test_funccalls.py: 5 warnings
tests/test_interpreter.py: 5 warnings
  /usr/lib/python3/dist-packages/larch/interpreter.py:1002: DeprecationWarning: Attribute s is deprecated and will be removed in Python 3.14; use value instead
    doc = docnode.value.s

tests/test_interpreter.py::TestEval::test_astdump
  /tmp/autopkgtest.Jzb2kz/autopkgtest_tmp/tests/test_interpreter.py:749: DeprecationWarning: ast.Num is deprecated and will be removed in Python 3.14; use ast.Constant instead
    self.assertTrue(isinstance(astnode.body[0].value, ast.Num))

tests/test_interpreter.py::TestEval::test_astdump
  /tmp/autopkgtest.Jzb2kz/autopkgtest_tmp/tests/test_interpreter.py:751: DeprecationWarning: Attribute n is deprecated and will be removed in Python 3.14; use value instead
    self.assertTrue(astnode.body[0].value.n == 1)

-- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html
!!!!!!!!!!!!!!!!!!!!!!!!!! stopping after 1 failures !!!!!!!!!!!!!!!!!!!!!!!!!!!
================== 1 failed, 114 passed, 26 warnings in 7.16s ==================