BUG: fix f2py tests to work with v2 API#26935
BUG: fix f2py tests to work with v2 API#26935seberg merged 1 commit intonumpy:mainfrom paddyroddy:f2py-compile-test
f2py tests to work with v2 API#26935Conversation
|
Yeah, what we would need is detecting whether compilation should work first, and then compile only (rather than just trying to compile the actual module). @charris, I guess this is maybe the last thing for a 2.0.1? |
| PyArray_TYPE(arr), | ||
| PyArray_ITEMSIZE(arr), | ||
| PyArray_DESCR(arr)->alignment, | ||
| PyDataType_ALIGNMENT(arr), |
| try: | ||
| backend.compile() | ||
| except: | ||
| except subprocess.CalledProcessError: |
There was a problem hiding this comment.
Better than a bare except
|
Thanks for fixing this, @paddyroddy seems I forgot to ask for that: But could you please undo the "non core" changes? |
|
EDIT: Sorry, wrong browser tab... |
This is a clear bug which CI unfortunately doesn't see because it just skips the f2py test if compilation fails (which it does here). The error is slightly more precise now, but not precise enough to avoid that issue.
|
Thanks, merging since we should backport this for 2.0.1. I did remove all the "non-core" changes from the PR, however. |
f2py tests to work with v2 APIf2py tests to work with v2 API
Cool, no problem. Sorry, I've been on holiday that past week. |
Fixes #26917. I've also modernised/improved the code in the relevant test files.
CI was failing prior to a4bd4a8 due to compiler errors in CI. Obviously not ideal reinstating this, but locally on my
macOS 14.5 arm64all tests pass withspin test -m full.