Repository navigation
TST: add 3.15t win32 CI and fix issues seen in that build - #31607
Conversation
895a079 to
21c7b46
Compare
|
You may want to disable most of the other tests just to speed things up. |
|
It looks like there are a bunch of other issues related to Cython that the wheel builder job doesn't hit. I'll have to dig in to see what's happening there... |
|
cython/cython#7742 is the cause of the cython crashes |
21c7b46 to
9ab1ae7
Compare
|
This looks pretty straight forward. Because we will be supporting 3.15 in 2.5.x, it would probably make things easier if we backported these fixups when they are ready, we don't need to create wheels for them. |
|
Note to self: backport Cython update when it happens. |
|
I note that the DeprecationWarnings are still being captured. Any plans for that? |
|
That is a different bug in how those warnings are generated that requires tricky C fixes, I'll open a separate PR with what Claude came up with. |
|
I opened #31617 for the datetime/timedelta warnings. |
seberg
left a comment
There was a problem hiding this comment.
Seems good, but maybe Chuck wants to look at something. I think it is worth making that helper not meson specific even if we mostly/only use it for meson subprocess runs right now.
But generally looks all good and basically ready to merge.
| return wrapper | ||
|
|
||
|
|
||
| def run_meson(args, build_dir): |
There was a problem hiding this comment.
I like the idea of adding a helper, we have a few places that work around it, but even assigning to locals, pytest may not print enough to make out exactly.
How about renaming it, dunno maybe check_subprocess() and not including the "meson" so that we can use it for all such tests.
| @pytest.mark.skipif( | ||
| not IS_64BIT, | ||
| reason="the 458 MiB sample array may not fit in a 32-bit " | ||
| "address space fragmented by earlier tests") |
There was a problem hiding this comment.
Sounds fine, thanks, doesn't seem worth skipping only if allocation fails for this.
| # meson refers to sources via paths relative to the build dir, and on | ||
| # Windows the unnormalized cwd + `..` chain joining the deeply nested | ||
| # pytest tmp dir and site-packages can exceed MAX_PATH, failing the | ||
| # compile with "Cannot open source file". |
There was a problem hiding this comment.
Fun when we actually pass the absolute dir, I guess.
| run: | | ||
| cd tools | ||
| python -m pytest --pyargs numpy -m "not slow" -n2 --timeout=600 --durations=10 | ||
| python -c "import sys; import numpy; sys.exit(not numpy.test(label='full', extra_argv=['-n=auto', '--durations=10', '--timeout=600']))" |
There was a problem hiding this comment.
This change seems unnecessary? I get it that the cibw_test_command uses it but diverging the way we run them here feels confusing.
| # Cython's constant immortalization passes UINT32_MAX through a Py_ssize_t, | ||
| # which aborts module init on 32-bit free-threaded builds when asserts are | ||
| # enabled. See https://github.com/cython/cython/issues/7742. | ||
| extra_c_args += ['-DCYTHON_IMMORTAL_CONSTANTS=0'] |
There was a problem hiding this comment.
Could mention that it should be fixed by Cython 3.2.6, but doesn't matter much.
Add trailing lf.
|
Let's get this in. There are ways to avoid long, long lines in yml, but we can live with a few. |
|
Thanks Nathan. |
Co-authored-by: Charles Harris <[email protected]>
TST: add 3.15t win32 CI and fix issues seen in that build (#31607)
Partial backport of the numpy/testing/_private/utils.py hunk of numpy#31607, needed by the multithreaded tests added in numpy#31682. (cherry picked from commit 4cbd55f)
Adds win32 3.15t CI and fixes issues seen in the numpy-release automation. I also enabled "full" tests using the same test command as the windows wheel builder.
The Cython issues were reported upstream in cython/cython#7742 and will be fixed in the next Cython release.
I adjusted tests that run meson to use a new helper that embeds debug info into the pytest failure message. That way debug output is no longer swallowed by pytest-xdist and we'll see errors in CI.
Fixed an issue in the cython tests that led to file paths longer than MAX_PATH so I updated the tests to copy the build tree to generate shorter paths.
Disabled
test_dirichlet_moderately_small_alphaon 32 bit builds. 458 MiB is almost 10% of a 32 bit address space and on a test runner with 4 workers it's possible or even likely for memory to get sufficiently fragmented such that this test triggers OOM errors. mimalloc and the free-threaded build might make this situation worse?ping @seberg @charris since this got reasonably involved.
I used Claude Fable 5 to help with this PR.