Skip to content

Commit 9319f4a

Browse files
committed
Merge branch 'master' into sh_merge_master
2 parents ddb677b + b33d06f commit 9319f4a

File tree

22 files changed

+92
-62
lines changed

22 files changed

+92
-62
lines changed

.github/workflows/ci.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,9 +38,9 @@ jobs:
3838
- '3.10'
3939
- '3.11'
4040
- '3.12'
41-
- 'pypy-3.7'
4241
- 'pypy-3.8'
4342
- 'pypy-3.9'
43+
- 'pypy-3.10'
4444

4545
# Items in here will either be added to the build matrix (if not
4646
# present), or add new keys to an existing matrix element if all the
@@ -338,8 +338,8 @@ jobs:
338338
# Testing NVCC; forces sources to behave like .cu files
339339
cuda:
340340
runs-on: ubuntu-latest
341-
name: "🐍 3.10 • CUDA 11.7 • Ubuntu 22.04"
342-
container: nvidia/cuda:11.7.0-devel-ubuntu22.04
341+
name: "🐍 3.10 • CUDA 12.2 • Ubuntu 22.04"
342+
container: nvidia/cuda:12.2.0-devel-ubuntu22.04
343343

344344
steps:
345345
- uses: actions/checkout@v3

.github/workflows/configure.yml

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,20 +27,24 @@ jobs:
2727
matrix:
2828
runs-on: [ubuntu-20.04, macos-latest, windows-latest]
2929
arch: [x64]
30-
cmake: ["3.23"]
30+
cmake: ["3.26"]
3131

3232
include:
3333
- runs-on: ubuntu-20.04
3434
arch: x64
35-
cmake: 3.4
35+
cmake: "3.5"
36+
37+
- runs-on: ubuntu-20.04
38+
arch: x64
39+
cmake: "3.27"
3640

3741
- runs-on: macos-latest
3842
arch: x64
39-
cmake: 3.7
43+
cmake: "3.7"
4044

4145
- runs-on: windows-2019
4246
arch: x64 # x86 compilers seem to be missing on 2019 image
43-
cmake: 3.18
47+
cmake: "3.18"
4448

4549
name: 🐍 3.7 • CMake ${{ matrix.cmake }} • ${{ matrix.runs-on }}
4650
runs-on: ${{ matrix.runs-on }}

.github/workflows/pip.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -103,13 +103,13 @@ jobs:
103103
- uses: actions/download-artifact@v3
104104

105105
- name: Publish standard package
106-
uses: pypa/gh-action-pypi-publish@v1.8.6
106+
uses: pypa/gh-action-pypi-publish@release/v1
107107
with:
108108
password: ${{ secrets.pypi_password }}
109109
packages-dir: standard/
110110

111111
- name: Publish global package
112-
uses: pypa/gh-action-pypi-publish@v1.8.6
112+
uses: pypa/gh-action-pypi-publish@release/v1
113113
with:
114114
password: ${{ secrets.pypi_password_global }}
115115
packages-dir: global/

.pre-commit-config.yaml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ repos:
2525

2626
# Clang format the codebase automatically
2727
- repo: https://github.com/pre-commit/mirrors-clang-format
28-
rev: "v16.0.4"
28+
rev: "v16.0.6"
2929
hooks:
3030
- id: clang-format
3131
types_or: [c++, c, cuda]
@@ -37,15 +37,15 @@ repos:
3737
- id: black
3838

3939
# Ruff, the Python auto-correcting linter written in Rust
40-
- repo: https://github.com/charliermarsh/ruff-pre-commit
41-
rev: v0.0.270
40+
- repo: https://github.com/astral-sh/ruff-pre-commit
41+
rev: v0.0.276
4242
hooks:
4343
- id: ruff
4444
args: ["--fix", "--show-fixes"]
4545

4646
# Check static types with mypy
4747
- repo: https://github.com/pre-commit/mirrors-mypy
48-
rev: "v1.3.0"
48+
rev: "v1.4.1"
4949
hooks:
5050
- id: mypy
5151
args: []
@@ -85,7 +85,7 @@ repos:
8585

8686
# Also code format the docs
8787
- repo: https://github.com/asottile/blacken-docs
88-
rev: "1.13.0"
88+
rev: "1.14.0"
8989
hooks:
9090
- id: blacken-docs
9191
additional_dependencies:
@@ -126,7 +126,7 @@ repos:
126126
# Use tools/codespell_ignore_lines_from_errors.py
127127
# to rebuild .codespell-ignore-lines
128128
- repo: https://github.com/codespell-project/codespell
129-
rev: "v2.2.4"
129+
rev: "v2.2.5"
130130
hooks:
131131
- id: codespell
132132
exclude: ".supp$"

CMakeLists.txt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,15 +5,15 @@
55
# All rights reserved. Use of this source code is governed by a
66
# BSD-style license that can be found in the LICENSE file.
77

8-
cmake_minimum_required(VERSION 3.4)
8+
cmake_minimum_required(VERSION 3.5)
99

10-
# The `cmake_minimum_required(VERSION 3.4...3.22)` syntax does not work with
10+
# The `cmake_minimum_required(VERSION 3.5...3.26)` syntax does not work with
1111
# some versions of VS that have a patched CMake 3.11. This forces us to emulate
1212
# the behavior using the following workaround:
13-
if(${CMAKE_VERSION} VERSION_LESS 3.22)
13+
if(${CMAKE_VERSION} VERSION_LESS 3.26)
1414
cmake_policy(VERSION ${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION})
1515
else()
16-
cmake_policy(VERSION 3.22)
16+
cmake_policy(VERSION 3.26)
1717
endif()
1818

1919
# Avoid infinite recursion if tests include this as a subdirectory

docs/advanced/embedding.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ information, see :doc:`/compiling`.
1818

1919
.. code-block:: cmake
2020
21-
cmake_minimum_required(VERSION 3.4)
21+
cmake_minimum_required(VERSION 3.5...3.26)
2222
project(example)
2323
2424
find_package(pybind11 REQUIRED) # or `add_subdirectory(pybind11)`

docs/classes.rst

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -549,3 +549,7 @@ The ``name`` property returns the name of the enum value as a unicode string.
549549
...
550550
551551
By default, these are omitted to conserve space.
552+
553+
.. warning::
554+
555+
Contrary to Python customs, enum values from the wrappers should not be compared using ``is``, but with ``==`` (see `#1177 <https://github.com/pybind/pybind11/issues/1177>`_ for background).

docs/compiling.rst

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -241,7 +241,7 @@ extension module can be created with just a few lines of code:
241241

242242
.. code-block:: cmake
243243
244-
cmake_minimum_required(VERSION 3.4...3.18)
244+
cmake_minimum_required(VERSION 3.5...3.26)
245245
project(example LANGUAGES CXX)
246246
247247
add_subdirectory(pybind11)
@@ -261,6 +261,9 @@ PyPI integration, can be found in the [cmake_example]_ repository.
261261
.. versionchanged:: 2.6
262262
CMake 3.4+ is required.
263263

264+
.. versionchanged:: 2.11
265+
CMake 3.5+ is required.
266+
264267
Further information can be found at :doc:`cmake/index`.
265268

266269
pybind11_add_module
@@ -495,7 +498,7 @@ You can use these targets to build complex applications. For example, the
495498

496499
.. code-block:: cmake
497500
498-
cmake_minimum_required(VERSION 3.4)
501+
cmake_minimum_required(VERSION 3.5...3.26)
499502
project(example LANGUAGES CXX)
500503
501504
find_package(pybind11 REQUIRED) # or add_subdirectory(pybind11)
@@ -553,7 +556,7 @@ information about usage in C++, see :doc:`/advanced/embedding`.
553556

554557
.. code-block:: cmake
555558
556-
cmake_minimum_required(VERSION 3.4...3.18)
559+
cmake_minimum_required(VERSION 3.5...3.26)
557560
project(example LANGUAGES CXX)
558561
559562
find_package(pybind11 REQUIRED) # or add_subdirectory(pybind11)

docs/faq.rst

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -284,7 +284,8 @@ There are three possible solutions:
284284
COMPONENTS Interpreter Development)`` on modern CMake (3.12+, 3.15+ better,
285285
3.18.2+ best). Pybind11 in these cases uses the new CMake FindPython instead
286286
of the old, deprecated search tools, and these modules are much better at
287-
finding the correct Python.
287+
finding the correct Python. If FindPythonLibs/Interp are not available
288+
(CMake 3.27+), then this will be ignored and FindPython will be used.
288289
3. Set ``PYBIND11_NOPYTHON`` to ``TRUE``. Pybind11 will not search for Python.
289290
However, you will have to use the target-based system, and do more setup
290291
yourself, because it does not know about or include things that depend on

docs/upgrade.rst

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,20 @@ to a new version. But it goes into more detail. This includes things like
88
deprecated APIs and their replacements, build system changes, general code
99
modernization and other useful information.
1010

11+
.. _upgrade-guide-2.11:
12+
13+
v2.11
14+
=====
15+
16+
* The minimum version of CMake is now 3.5. A future version will likely move to
17+
requiring something like CMake 3.15. Note that CMake 3.27 is removing the
18+
long-deprecated support for ``FindPythonInterp`` if you set 3.27 as the
19+
minimum or maximum supported version. To prepare for that future, CMake 3.15+
20+
using ``FindPython`` or setting ``PYBIND11_FINDPYTHON`` is highly recommended,
21+
otherwise pybind11 will automatically switch to using ``FindPython`` if
22+
``FindPythonInterp`` is not available.
23+
24+
1125
.. _upgrade-guide-2.9:
1226

1327
v2.9

0 commit comments

Comments
 (0)