Skip to content

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

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
ngoldbaum opened this issue Jul 11, 2024 · 0 comments · Fixed by #26935
Closed

Comments

@ngoldbaum
Copy link
Member

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants