Skip to content

numpy/f2py/tests/test_array_from_pyobj.py skips all tests due to use of legacy dtype API #26917

Closed
@ngoldbaum

Description

@ngoldbaum

There is a try/except in the f2py util testing code that masks compilation errors:

try:
backend.compile()
except:
pytest.skip("Failed to compile module")

If I delete that, all the tests in test_array_from_pyobj.py fail with the following compilation error:

/Users/goldbaum/Documents/numpy/build-install/usr/lib/python3.13/site-packages/numpy/f2py/tests/src/array_from_pyobj/wrapmodule.c:118:44: error: no member named 'alignment' in 'struct _PyArray_Descr'
                       PyArray_DESCR(arr)->alignment,
                       ~~~~~~~~~~~~~~~~~~  ^

The try/except seems like a bad idea but I guess it's there for a reason for distutils support. Probably worth seeing if there are other tests like this.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions