[Debichem-devel] Bug#1056457: Bug#1056457: python-ase's autopkg tests fail with Python 3.12

s3v c0llapsed at yahoo.it
Thu Dec 21 08:53:43 GMT 2023


Hi,

On Thu, 21 Dec 2023 08:39:54 +0200 Andrius Merkys <merkys at debian.org> wrote:
> Is there a way to ignore DeprecationWarnings, but leave them in to the
> output? They are quite helpful to see, but not worth failing the build
> at the time being.
>

You're right, deprecation outputs are useful.
I've just tried by commenting "error" in ase/test/pytest.ini for stop
treating warnings as errors. Outputs are in place and tests don't fail
as well.


===================================================================== warnings summary ======================================================================
...
...
test_forcecurve.py::test_forcecurve
  /usr/lib/python3/dist-packages/dateutil/tz/tz.py:37: DeprecationWarning: datetime.datetime.utcfromtimestamp() is deprecated and scheduled for removal in a future version. Use timezone-aware objects
to represent datetimes in UTC: datetime.datetime.fromtimestamp(timestamp, datetime.UTC).
    EPOCH = datetime.datetime.utcfromtimestamp(0)

test_parsemath.py: 109 warnings
constraints/test_parameteric_constr.py: 66 warnings
fio/test_aims_io.py: 66 warnings
  /build/python-ase-3.22.1/.pybuild/cpython3_3.12_ase/build/ase/utils/parsemath.py:146: DeprecationWarning: ast.Num is deprecated and will be removed in Python 3.14; use ast.Constant instead
    if isinstance(node, ast.Num):  # <number>

test_parsemath.py: 50 warnings
constraints/test_parameteric_constr.py: 64 warnings
fio/test_aims_io.py: 45 warnings
  /build/python-ase-3.22.1/.pybuild/cpython3_3.12_ase/build/ase/utils/parsemath.py:147: DeprecationWarning: Attribute n is deprecated and will be removed in Python 3.14; use value instead
    return node.n



Thanks for maintaining python-ase!



More information about the Debichem-devel mailing list