Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 4 additions & 5 deletions .github/workflows/tests-cibw.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,12 @@ jobs:
submodules: true
fetch-depth: 0

- uses: pypa/cibuildwheel@v3.4
- uses: pypa/cibuildwheel@v4.1
env:
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 }}
Expand All @@ -48,10 +48,9 @@ jobs:
# We have to uninstall first because GH is now using a local tap to build cmake<4, iOS needs cmake>=4
- run: brew uninstall cmake && brew install cmake

- uses: pypa/cibuildwheel@v3.4
- uses: pypa/cibuildwheel@v4.1
env:
CIBW_PLATFORM: ios
CIBW_SKIP: cp314-* # https://github.com/pypa/cibuildwheel/issues/2494
with:
package-dir: tests

Expand All @@ -73,7 +72,7 @@ jobs:
if: contains(matrix.runs-on, 'macos')
run: echo "CIBW_TEST_COMMAND=" >> "$GITHUB_ENV"

- uses: pypa/cibuildwheel@v3.4
- uses: pypa/cibuildwheel@v4.1
env:
CIBW_PLATFORM: android
with:
Expand Down
14 changes: 14 additions & 0 deletions tests/test_numpy_array.py
Original file line number Diff line number Diff line change
@@ -1,12 +1,22 @@
from __future__ import annotations

import sys

import pytest

import env # noqa: F401
from pybind11_tests import numpy_array as m

np = pytest.importorskip("numpy")

# numpy < 2.4 has a resize(refcheck=True) regression on Python 3.14: it fails to
Comment thread
henryiii marked this conversation as resolved.
Outdated
# notice the reference held by the bound function, so a resize that should raise
# instead succeeds. Only the iOS test environment is still pinned to such a numpy
# (no newer iOS wheels exist yet).
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.
Expand Down Expand Up @@ -485,6 +495,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)
Expand Down
Loading