Skip to content

Commit af80bc3

Browse files
Merge branch 'master' into pep695-generic-docstring
2 parents 43e1d0a + e6984c8 commit af80bc3

File tree

92 files changed

+2257
-615
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

92 files changed

+2257
-615
lines changed

.codespell-ignore-lines

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ template <op_id id, op_type ot, typename L = undefined_t, typename R = undefined
22
template <typename ThisT>
33
auto &this_ = static_cast<ThisT &>(*this);
44
if (load_impl<ThisT>(temp, false)) {
5+
return load_impl<ThisT>(src, false);
56
ssize_t nd = 0;
67
auto trivial = broadcast(buffers, nd, shape);
78
auto ndim = (size_t) nd;

.github/workflows/ci.yml

Lines changed: 50 additions & 122 deletions
Original file line numberDiff line numberDiff line change
@@ -179,12 +179,13 @@ jobs:
179179

180180
name: "🐍 ${{ matrix.python-version }} • ${{ matrix.runs-on }} • x64 inplace C++14"
181181
runs-on: ${{ matrix.runs-on }}
182+
timeout-minutes: 90
182183

183184
steps:
184-
- uses: actions/checkout@v4
185+
- uses: actions/checkout@v5
185186

186187
- name: Setup Python ${{ matrix.python-version }}
187-
uses: actions/setup-python@v5
188+
uses: actions/setup-python@v6
188189
with:
189190
python-version: ${{ matrix.python-version }}
190191
allow-prereleases: true
@@ -202,7 +203,8 @@ jobs:
202203
if: runner.os != 'Windows'
203204
run: echo "CMAKE_GENERATOR=Ninja" >> "$GITHUB_ENV"
204205

205-
# More-or-less randomly adding a few extra flags here
206+
# More-or-less randomly adding a few extra flags here.
207+
# In particular, use this one to test the next ABI bump (internals version).
206208
- name: Configure
207209
run: >
208210
cmake -S. -B.
@@ -212,6 +214,7 @@ jobs:
212214
-DDOWNLOAD_CATCH=ON
213215
-DDOWNLOAD_EIGEN=ON
214216
-DCMAKE_CXX_STANDARD=14
217+
-DPYBIND11_INTERNALS_VERSION=10000000
215218
216219
# Checks to makes sure defining `_` is allowed
217220
# Triggers EHsc missing error on Windows
@@ -242,7 +245,7 @@ jobs:
242245
timeout-minutes: 40
243246
container: quay.io/pypa/musllinux_1_2_x86_64:latest
244247
steps:
245-
- uses: actions/checkout@v4
248+
- uses: actions/checkout@v5
246249
with:
247250
fetch-depth: 0
248251

@@ -277,9 +280,10 @@ jobs:
277280

278281
name: "🐍 ${{ matrix.python-version }}${{ matrix.python-debug && '-dbg' || '' }} (deadsnakes)${{ matrix.valgrind && ' • Valgrind' || '' }} • x64"
279282
runs-on: ubuntu-latest
283+
timeout-minutes: 90
280284

281285
steps:
282-
- uses: actions/checkout@v4
286+
- uses: actions/checkout@v5
283287

284288
- name: Setup Python ${{ matrix.python-version }} (deadsnakes)
285289
uses: deadsnakes/[email protected]
@@ -364,9 +368,10 @@ jobs:
364368

365369
name: "🐍 3 • Clang ${{ matrix.clang }} • C++${{ matrix.std }} • x64${{ matrix.cxx_flags && ' • cxx_flags' || '' }}"
366370
container: "silkeh/clang:${{ matrix.clang }}${{ matrix.container_suffix }}"
371+
timeout-minutes: 90
367372

368373
steps:
369-
- uses: actions/checkout@v4
374+
- uses: actions/checkout@v5
370375

371376
- name: Add wget and python3
372377
run: apt-get update && apt-get install -y python3-dev python3-numpy python3-pytest libeigen3-dev
@@ -401,9 +406,10 @@ jobs:
401406
runs-on: ubuntu-latest
402407
name: "🐍 3.10 • CUDA 12.2 • Ubuntu 22.04"
403408
container: nvidia/cuda:12.2.0-devel-ubuntu22.04
409+
timeout-minutes: 90
404410

405411
steps:
406-
- uses: actions/checkout@v4
412+
- uses: actions/checkout@v5
407413

408414
# tzdata will try to ask for the timezone, so set the DEBIAN_FRONTEND
409415
- name: Install 🐍 3
@@ -427,7 +433,7 @@ jobs:
427433
# container: centos:8
428434
#
429435
# steps:
430-
# - uses: actions/checkout@v4
436+
# - uses: actions/checkout@v5
431437
#
432438
# - name: Add Python 3 and a few requirements
433439
# run: yum update -y && yum install -y git python3-devel python3-numpy python3-pytest make environment-modules
@@ -468,12 +474,13 @@ jobs:
468474
if: github.event.pull_request.draft == false
469475
runs-on: ubuntu-22.04
470476
name: "🐍 3 • NVHPC 23.5 • C++17 • x64"
477+
timeout-minutes: 90
471478

472479
env:
473480
# tzdata will try to ask for the timezone, so set the DEBIAN_FRONTEND
474481
DEBIAN_FRONTEND: 'noninteractive'
475482
steps:
476-
- uses: actions/checkout@v4
483+
- uses: actions/checkout@v5
477484

478485
- name: Add NVHPC Repo
479486
run: |
@@ -532,9 +539,10 @@ jobs:
532539

533540
name: "🐍 3 • GCC ${{ matrix.gcc }} • C++${{ matrix.std }} • x64${{ matrix.cxx_flags && ' • cxx_flags' || '' }}"
534541
container: "gcc:${{ matrix.gcc }}"
542+
timeout-minutes: 90
535543

536544
steps:
537-
- uses: actions/checkout@v4
545+
- uses: actions/checkout@v5
538546

539547
- name: Add Python 3
540548
run: apt-get update; apt-get install -y python3-dev python3-numpy python3-pytest python3-pip libeigen3-dev
@@ -593,11 +601,12 @@ jobs:
593601
icc:
594602
if: github.event.pull_request.draft == false
595603
runs-on: ubuntu-22.04
604+
timeout-minutes: 90
596605

597606
name: "🐍 3 • ICC latest • x64"
598607

599608
steps:
600-
- uses: actions/checkout@v4
609+
- uses: actions/checkout@v5
601610

602611
- name: Add apt repo
603612
run: |
@@ -707,10 +716,11 @@ jobs:
707716

708717
name: "🐍 3 • ${{ matrix.container }} • x64"
709718
container: "${{ matrix.container }}"
719+
timeout-minutes: 90
710720

711721
steps:
712722
- name: Latest actions/checkout
713-
uses: actions/checkout@v4
723+
uses: actions/checkout@v5
714724

715725
- name: Add Python 3.8
716726
if: matrix.container == 'almalinux:8'
@@ -765,6 +775,7 @@ jobs:
765775
name: "🐍 3.9 • Debian • x86 • Install"
766776
runs-on: ubuntu-latest
767777
container: i386/debian:bullseye
778+
timeout-minutes: 90
768779

769780
steps:
770781
- uses: actions/checkout@v1 # v1 is required to run inside docker
@@ -809,11 +820,12 @@ jobs:
809820
if: github.event.pull_request.draft == false
810821
name: "Documentation build test"
811822
runs-on: ubuntu-latest
823+
timeout-minutes: 90
812824

813825
steps:
814-
- uses: actions/checkout@v4
826+
- uses: actions/checkout@v5
815827

816-
- uses: actions/setup-python@v5
828+
- uses: actions/setup-python@v6
817829
with:
818830
python-version: "3.x"
819831

@@ -855,12 +867,13 @@ jobs:
855867

856868
name: "🐍 ${{ matrix.python }} • MSVC 2022 • x86 ${{ matrix.args }}"
857869
runs-on: windows-2022
870+
timeout-minutes: 90
858871

859872
steps:
860-
- uses: actions/checkout@v4
873+
- uses: actions/checkout@v5
861874

862875
- name: Setup Python ${{ matrix.python }}
863-
uses: actions/setup-python@v5
876+
uses: actions/setup-python@v6
864877
with:
865878
python-version: ${{ matrix.python }}
866879
architecture: x86
@@ -907,12 +920,13 @@ jobs:
907920

908921
name: "🐍 ${{ matrix.python }} • MSVC 2022 (Debug) • x86 ${{ matrix.args }}"
909922
runs-on: windows-2022
923+
timeout-minutes: 90
910924

911925
steps:
912-
- uses: actions/checkout@v4
926+
- uses: actions/checkout@v5
913927

914928
- name: Setup Python ${{ matrix.python }}
915-
uses: actions/setup-python@v5
929+
uses: actions/setup-python@v6
916930
with:
917931
python-version: ${{ matrix.python }}
918932
architecture: x86
@@ -955,12 +969,13 @@ jobs:
955969

956970
name: "🐍 ${{ matrix.python }} • MSVC 2022 C++20 • x64"
957971
runs-on: windows-2022
972+
timeout-minutes: 90
958973

959974
steps:
960-
- uses: actions/checkout@v4
975+
- uses: actions/checkout@v5
961976

962977
- name: Setup Python ${{ matrix.python }}
963-
uses: actions/setup-python@v5
978+
uses: actions/setup-python@v6
964979
with:
965980
python-version: ${{ matrix.python }}
966981

@@ -1012,15 +1027,23 @@ jobs:
10121027
if: github.event.pull_request.draft == false
10131028
name: "🐍 3 • windows-latest • ${{ matrix.sys }}"
10141029
runs-on: windows-latest
1030+
timeout-minutes: 90
10151031
defaults:
10161032
run:
10171033
shell: msys2 {0}
10181034
strategy:
10191035
fail-fast: false
10201036
matrix:
10211037
include:
1022-
- { sys: mingw64, env: x86_64 }
1023-
- { sys: mingw32, env: i686 }
1038+
- sys: mingw32
1039+
env: i686
1040+
extra_install: ""
1041+
- sys: mingw64
1042+
env: x86_64
1043+
extra_install: |
1044+
mingw-w64-x86_64-python-numpy
1045+
mingw-w64-x86_64-python-scipy
1046+
mingw-w64-x86_64-eigen3
10241047
steps:
10251048
- uses: msys2/setup-msys2@v2
10261049
with:
@@ -1034,17 +1057,9 @@ jobs:
10341057
mingw-w64-${{matrix.env}}-python-pytest
10351058
mingw-w64-${{matrix.env}}-boost
10361059
mingw-w64-${{matrix.env}}-catch
1060+
${{ matrix.extra_install }}
10371061
1038-
- uses: msys2/setup-msys2@v2
1039-
if: matrix.sys == 'mingw64'
1040-
with:
1041-
msystem: ${{matrix.sys}}
1042-
install: >-
1043-
mingw-w64-${{matrix.env}}-python-numpy
1044-
mingw-w64-${{matrix.env}}-python-scipy
1045-
mingw-w64-${{matrix.env}}-eigen3
1046-
1047-
- uses: actions/checkout@v4
1062+
- uses: actions/checkout@v5
10481063

10491064
- name: Configure C++11
10501065
# LTO leads to many undefined reference like
@@ -1126,6 +1141,7 @@ jobs:
11261141
python: ['3.10']
11271142

11281143
runs-on: "${{ matrix.os }}"
1144+
timeout-minutes: 90
11291145

11301146
name: "🐍 ${{ matrix.python }} • ${{ matrix.os }} • clang-latest"
11311147

@@ -1134,13 +1150,13 @@ jobs:
11341150
run: env
11351151

11361152
- name: Checkout
1137-
uses: actions/checkout@v4
1153+
uses: actions/checkout@v5
11381154

11391155
- name: Set up Clang
11401156
uses: egor-tensin/setup-clang@v1
11411157

11421158
- name: Setup Python ${{ matrix.python }}
1143-
uses: actions/setup-python@v5
1159+
uses: actions/setup-python@v6
11441160
with:
11451161
python-version: ${{ matrix.python }}
11461162

@@ -1189,91 +1205,3 @@ jobs:
11891205

11901206
- name: Clean directory
11911207
run: git clean -fdx
1192-
1193-
macos_brew_install_llvm:
1194-
if: github.event.pull_request.draft == false
1195-
name: "macos-13 • brew install llvm"
1196-
runs-on: macos-13
1197-
1198-
env:
1199-
# https://apple.stackexchange.com/questions/227026/how-to-install-recent-clang-with-homebrew
1200-
LDFLAGS: '-L/usr/local/opt/llvm/lib -Wl,-rpath,/usr/local/opt/llvm/lib'
1201-
1202-
steps:
1203-
- name: Update PATH
1204-
run: echo "/usr/local/opt/llvm/bin" >> $GITHUB_PATH
1205-
1206-
- name: Show env
1207-
run: env
1208-
1209-
- name: Checkout
1210-
uses: actions/checkout@v4
1211-
1212-
- name: Show Clang++ version before brew install llvm
1213-
run: clang++ --version
1214-
1215-
- name: brew install llvm
1216-
run: brew install llvm
1217-
1218-
- name: Show Clang++ version after brew install llvm
1219-
run: clang++ --version
1220-
1221-
- name: Update CMake
1222-
uses: jwlawson/[email protected]
1223-
1224-
- name: Run pip installs
1225-
run: |
1226-
python3 -m pip install --upgrade pip
1227-
python3 -m pip install -r tests/requirements.txt
1228-
python3 -m pip install numpy
1229-
python3 -m pip install scipy
1230-
1231-
- name: Show CMake version
1232-
run: cmake --version
1233-
1234-
- name: CMake Configure
1235-
run: >
1236-
cmake -S . -B .
1237-
-DPYBIND11_WERROR=ON
1238-
-DPYBIND11_SIMPLE_GIL_MANAGEMENT=OFF
1239-
-DDOWNLOAD_CATCH=ON
1240-
-DDOWNLOAD_EIGEN=ON
1241-
-DCMAKE_CXX_COMPILER=clang++
1242-
-DCMAKE_CXX_STANDARD=17
1243-
-DPYTHON_EXECUTABLE=$(python3 -c "import sys; print(sys.executable)")
1244-
1245-
- name: Build
1246-
run: cmake --build . -j 2
1247-
1248-
- name: Python tests
1249-
run: cmake --build . --target pytest -j 2
1250-
1251-
- name: C++ tests
1252-
run: cmake --build . --target cpptest -j 2
1253-
1254-
- name: Interface test
1255-
run: cmake --build . --target test_cmake_build -j 2
1256-
1257-
- name: Visibility test
1258-
run: cmake --build . --target test_cross_module_rtti -j 2
1259-
1260-
- name: CMake Configure - Exercise cmake -DPYBIND11_TEST_OVERRIDE
1261-
run: >
1262-
cmake -S . -B build_partial
1263-
-DPYBIND11_WERROR=ON
1264-
-DPYBIND11_SIMPLE_GIL_MANAGEMENT=OFF
1265-
-DDOWNLOAD_CATCH=ON
1266-
-DDOWNLOAD_EIGEN=ON
1267-
-DCMAKE_CXX_COMPILER=clang++
1268-
-DCMAKE_CXX_STANDARD=17
1269-
-DPYTHON_EXECUTABLE=$(python3 -c "import sys; print(sys.executable)")
1270-
"-DPYBIND11_TEST_OVERRIDE=test_call_policies.cpp;test_gil_scoped.cpp;test_thread.cpp"
1271-
1272-
- name: Build - Exercise cmake -DPYBIND11_TEST_OVERRIDE
1273-
run: cmake --build build_partial -j 2
1274-
1275-
- name: Python tests - Exercise cmake -DPYBIND11_TEST_OVERRIDE
1276-
run: cmake --build build_partial --target pytest -j 2
1277-
1278-
- name: Clean directory
1279-
run: git clean -fdx

.github/workflows/configure.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,10 +48,10 @@ jobs:
4848
runs-on: ${{ matrix.runs-on }}
4949

5050
steps:
51-
- uses: actions/checkout@v4
51+
- uses: actions/checkout@v5
5252

5353
- name: Setup Python 3.11
54-
uses: actions/setup-python@v5
54+
uses: actions/setup-python@v6
5555
with:
5656
python-version: 3.11
5757

0 commit comments

Comments
 (0)