Skip to content

Commit a253b4e

Browse files
committed
Merge branch 'master' into master_with_dummy_change
2 parents 23377c0 + 35ff42b commit a253b4e

36 files changed

+798
-154
lines changed

.github/labeler.yml

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,13 @@
11
docs:
2-
- any:
3-
- 'docs/**/*.rst'
4-
- '!docs/changelog.rst'
5-
- '!docs/upgrade.rst'
2+
all:
3+
- changed-files:
4+
- all-globs-to-all-files:
5+
- '!docs/changelog.rst'
6+
- '!docs/upgrade.rst'
7+
- base-branch: "^(?!dependabot).*"
8+
- base-branch: "^(?!pre-commit-ci).*"
69

710
ci:
8-
- '.github/workflows/*.yml'
11+
- changed-files:
12+
- any-glob-to-any-file:
13+
- '.github/workflows/*.yml'

.github/labeler_merged.yml

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
# Add 'needs changelog` label to any change to code files as long as the `CHANGELOG` hasn't changed
2+
# Skip dependabot and pre-commit-ci PRs
13
needs changelog:
2-
- all:
3-
- '!docs/changelog.rst'
4+
- all:
5+
- changed-files:
6+
- all-globs-to-all-files: "!docs/changelog.rst"
7+
- base-branch: "^(?!dependabot).*"
8+
- base-branch: "^(?!pre-commit-ci).*"

.github/workflows/ci.yml

Lines changed: 39 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -30,13 +30,12 @@ jobs:
3030
strategy:
3131
fail-fast: false
3232
matrix:
33-
runs-on: [ubuntu-20.04, windows-2022, macos-latest]
33+
runs-on: [ubuntu-20.04, windows-2022, macos-13]
3434
python:
3535
- '3.6'
3636
- '3.9'
37-
- '3.10'
38-
- '3.11'
3937
- '3.12'
38+
- '3.13'
4039
- 'pypy-3.8'
4140
- 'pypy-3.9'
4241
- 'pypy-3.10'
@@ -64,6 +63,10 @@ jobs:
6463
# Inject a couple Windows 2019 runs
6564
- runs-on: windows-2019
6665
python: '3.9'
66+
# Extra ubuntu latest job
67+
- runs-on: ubuntu-latest
68+
python: '3.11'
69+
6770

6871
name: "🐍 ${{ matrix.python }} • ${{ matrix.runs-on }} • x64 ${{ matrix.args }}"
6972
runs-on: ${{ matrix.runs-on }}
@@ -75,6 +78,7 @@ jobs:
7578
uses: actions/setup-python@v5
7679
with:
7780
python-version: ${{ matrix.python }}
81+
allow-prereleases: true
7882

7983
- name: Setup Boost (Linux)
8084
# Can't use boost + define _
@@ -192,6 +196,35 @@ jobs:
192196
pytest tests/extra_setuptools
193197
if: "!(matrix.runs-on == 'windows-2022')"
194198

199+
manylinux:
200+
name: Manylinux on 🐍 3.13t • GIL
201+
runs-on: ubuntu-latest
202+
timeout-minutes: 40
203+
container: quay.io/pypa/musllinux_1_2_x86_64:latest
204+
steps:
205+
- uses: actions/checkout@v4
206+
with:
207+
fetch-depth: 0
208+
209+
- name: Prepare venv
210+
run: python3.13t -m venv .venv
211+
212+
- name: Install Python deps
213+
run: .venv/bin/pip install -r tests/requirements.txt
214+
215+
- name: Configure C++11
216+
run: >
217+
cmake -S. -Bbuild
218+
-DPYBIND11_WERROR=ON
219+
-DDOWNLOAD_CATCH=ON
220+
-DDOWNLOAD_EIGEN=ON
221+
-DPython_ROOT_DIR=.venv
222+
223+
- name: Build C++11
224+
run: cmake --build build -j2
225+
226+
- name: Python tests C++11
227+
run: cmake --build build --target pytest -j2
195228

196229
deadsnakes:
197230
strategy:
@@ -972,7 +1005,6 @@ jobs:
9721005
mingw-w64-${{matrix.env}}-cmake
9731006
mingw-w64-${{matrix.env}}-make
9741007
mingw-w64-${{matrix.env}}-python-pytest
975-
mingw-w64-${{matrix.env}}-eigen3
9761008
mingw-w64-${{matrix.env}}-boost
9771009
mingw-w64-${{matrix.env}}-catch
9781010
@@ -983,6 +1015,7 @@ jobs:
9831015
install: >-
9841016
git
9851017
mingw-w64-${{matrix.env}}-python-scipy
1018+
mingw-w64-${{matrix.env}}-eigen3
9861019
9871020
- uses: actions/checkout@v4
9881021

@@ -1118,8 +1151,8 @@ jobs:
11181151
run: git clean -fdx
11191152

11201153
macos_brew_install_llvm:
1121-
name: "macos-latest • brew install llvm"
1122-
runs-on: macos-latest
1154+
name: "macos-13 • brew install llvm"
1155+
runs-on: macos-13
11231156

11241157
env:
11251158
# https://apple.stackexchange.com/questions/227026/how-to-install-recent-clang-with-homebrew

.github/workflows/configure.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ jobs:
2424
strategy:
2525
fail-fast: false
2626
matrix:
27-
runs-on: [ubuntu-20.04, macos-latest, windows-latest]
27+
runs-on: [ubuntu-20.04, macos-13, windows-latest]
2828
arch: [x64]
2929
cmake: ["3.26"]
3030

@@ -37,7 +37,7 @@ jobs:
3737
arch: x64
3838
cmake: "3.29"
3939

40-
- runs-on: macos-latest
40+
- runs-on: macos-13
4141
arch: x64
4242
cmake: "3.7"
4343

.github/workflows/labeler.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ jobs:
1414
pull-requests: write
1515
steps:
1616

17-
- uses: actions/labeler@v4
17+
- uses: actions/labeler@v5
1818
if: >
1919
github.event.pull_request.merged == true &&
2020
!startsWith(github.event.pull_request.title, 'chore(deps):') &&

.pre-commit-config.yaml

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -25,22 +25,22 @@ repos:
2525

2626
# Clang format the codebase automatically
2727
- repo: https://github.com/pre-commit/mirrors-clang-format
28-
rev: "v18.1.2"
28+
rev: "v18.1.5"
2929
hooks:
3030
- id: clang-format
3131
types_or: [c++, c, cuda]
3232

3333
# Ruff, the Python auto-correcting linter/formatter written in Rust
3434
- repo: https://github.com/astral-sh/ruff-pre-commit
35-
rev: v0.3.5
35+
rev: v0.4.7
3636
hooks:
3737
- id: ruff
3838
args: ["--fix", "--show-fixes"]
3939
- id: ruff-format
4040

4141
# Check static types with mypy
4242
- repo: https://github.com/pre-commit/mirrors-mypy
43-
rev: "v1.9.0"
43+
rev: "v1.10.0"
4444
hooks:
4545
- id: mypy
4646
args: []
@@ -62,7 +62,7 @@ repos:
6262

6363
# Standard hooks
6464
- repo: https://github.com/pre-commit/pre-commit-hooks
65-
rev: "v4.5.0"
65+
rev: "v4.6.0"
6666
hooks:
6767
- id: check-added-large-files
6868
- id: check-case-conflict
@@ -78,7 +78,7 @@ repos:
7878
- id: trailing-whitespace
7979

8080
# Also code format the docs
81-
- repo: https://github.com/asottile/blacken-docs
81+
- repo: https://github.com/adamchainz/blacken-docs
8282
rev: "1.16.0"
8383
hooks:
8484
- id: blacken-docs
@@ -119,11 +119,11 @@ repos:
119119
# Use tools/codespell_ignore_lines_from_errors.py
120120
# to rebuild .codespell-ignore-lines
121121
- repo: https://github.com/codespell-project/codespell
122-
rev: "v2.2.6"
122+
rev: "v2.3.0"
123123
hooks:
124124
- id: codespell
125125
exclude: ".supp$"
126-
args: ["-x.codespell-ignore-lines", "-Lccompiler"]
126+
args: ["-x.codespell-ignore-lines", "-Lccompiler,intstruct"]
127127

128128
# Check for common shell mistakes
129129
- repo: https://github.com/shellcheck-py/shellcheck-py
@@ -142,13 +142,14 @@ repos:
142142

143143
# PyLint has native support - not always usable, but works for us
144144
- repo: https://github.com/PyCQA/pylint
145-
rev: "v3.1.0"
145+
rev: "v3.2.2"
146146
hooks:
147147
- id: pylint
148148
files: ^pybind11
149149

150+
# Check schemas on some of our YAML files
150151
- repo: https://github.com/python-jsonschema/check-jsonschema
151-
rev: 0.28.1
152+
rev: 0.28.4
152153
hooks:
153154
- id: check-readthedocs
154155
- id: check-github-workflows

CMakeLists.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,7 @@ option(PYBIND11_NUMPY_1_ONLY
116116
set(PYBIND11_INTERNALS_VERSION
117117
""
118118
CACHE STRING "Override the ABI version, may be used to enable the unstable ABI.")
119+
option(PYBIND11_USE_CROSSCOMPILING "Respect CMAKE_CROSSCOMPILING" OFF)
119120

120121
if(PYBIND11_DISABLE_HANDLE_TYPE_NAME_DEFAULT_IMPLEMENTATION)
121122
add_compile_definitions(PYBIND11_DISABLE_HANDLE_TYPE_NAME_DEFAULT_IMPLEMENTATION)
@@ -299,6 +300,7 @@ if(PYBIND11_INSTALL)
299300
tools/pybind11Common.cmake
300301
tools/pybind11Tools.cmake
301302
tools/pybind11NewTools.cmake
303+
tools/pybind11GuessPythonExtSuffix.cmake
302304
DESTINATION ${PYBIND11_CMAKECONFIG_INSTALL_DIR})
303305

304306
if(NOT PYBIND11_EXPORT_NAME)

docs/advanced/pycpp/numpy.rst

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -378,8 +378,6 @@ uses of ``py::array``:
378378

379379
- ``.itemsize()`` returns the size of an item in bytes, i.e. ``sizeof(T)``.
380380

381-
- ``.ndim()`` returns the number of dimensions.
382-
383381
- ``.shape(n)`` returns the size of dimension ``n``
384382

385383
- ``.size()`` returns the total number of elements (i.e. the product of the shapes).

docs/changelog.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ IN DEVELOPMENT
1515

1616
Changes will be summarized here periodically.
1717

18-
Version 2.12.0 (March 27, 2025)
18+
Version 2.12.0 (March 27, 2024)
1919
-------------------------------
2020

2121
New Features:

docs/conf.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@
8181
#
8282
# This is also used if you do content translation via gettext catalogs.
8383
# Usually you set "language" from the command line for these cases.
84-
language = None
84+
language = "en"
8585

8686
# There are two options for replacing |today|: either, you set today to some
8787
# non-false value, then it is used:

docs/requirements.in

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
breathe
2+
furo
3+
sphinx
4+
sphinx-copybutton
5+
sphinxcontrib-moderncmakedomain
6+
sphinxcontrib-svg2pdfconverter

0 commit comments

Comments
 (0)