diff --git a/.github/workflows/tests-cibw.yml b/.github/workflows/tests-cibw.yml index 1fa4c8a4a..83107b23d 100644 --- a/.github/workflows/tests-cibw.yml +++ b/.github/workflows/tests-cibw.yml @@ -30,7 +30,7 @@ jobs: PYODIDE_BUILD_EXPORTS: whole_archive with: package-dir: tests - only: cp312-pyodide_wasm32 + only: cp314-pyodide_wasm32 build-ios: name: iOS wheel ${{ matrix.runs-on }} @@ -51,7 +51,6 @@ jobs: - uses: pypa/cibuildwheel@v4.1 env: CIBW_PLATFORM: ios - CIBW_SKIP: cp314-* # https://github.com/pypa/cibuildwheel/issues/2494 with: package-dir: tests diff --git a/tests/test_numpy_array.py b/tests/test_numpy_array.py index 93477aa23..e3f29e92a 100644 --- a/tests/test_numpy_array.py +++ b/tests/test_numpy_array.py @@ -1,5 +1,7 @@ from __future__ import annotations +import sys + import pytest import env # noqa: F401 @@ -7,6 +9,12 @@ from pybind11_tests import numpy_array as m np = pytest.importorskip("numpy") +# numpy < 2.4 fails to detect aliasing in ndarray.resize on Python 3.14, so a +# resize that should raise instead succeeds: numpy/numpy#30265 (fixed in 2.4.0). +NUMPY_RESIZE_REFCHECK_BROKEN = sys.version_info >= (3, 14) and tuple( + int(x) for x in np.__version__.split(".")[:2] +) < (2, 4) + def test_dtypes(): # See issue #1328. @@ -485,6 +493,10 @@ def test_initializer_list(): assert m.array_initializer_list4().shape == (1, 2, 3, 4) +@pytest.mark.xfail( + NUMPY_RESIZE_REFCHECK_BROKEN, + reason="numpy<2.4 resize(refcheck) regression on Python 3.14", +) def test_array_resize(): a = np.array([1, 2, 3, 4, 5, 6, 7, 8, 9], dtype="float64") m.array_reshape2(a)