Skip to content

[smart_holder] git merge master (attempt 2) #4498

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 15 commits into from
Closed
Show file tree
Hide file tree
Changes from all 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
17 changes: 14 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,9 @@ jobs:

- name: Update CMake
uses: jwlawson/[email protected]
# TEMPORARILY pin version because 3.26.0-rc1 is failing under macOS:
with:
cmake-version: '3.25.2'

- name: Cache wheels
if: runner.os == 'macOS'
Expand Down Expand Up @@ -281,6 +284,8 @@ jobs:
- dev
std:
- 11
container_suffix:
- ""
include:
- clang: 5
std: 14
Expand All @@ -294,9 +299,12 @@ jobs:
std: 20
- clang: 14
std: 20
- clang: 15
std: 20
container_suffix: "-bullseye"

name: "🐍 3 • Clang ${{ matrix.clang }} • C++${{ matrix.std }} • x64"
container: "silkeh/clang:${{ matrix.clang }}"
container: "silkeh/clang:${{ matrix.clang }}${{ matrix.container_suffix }}"

steps:
- uses: actions/checkout@v3
Expand Down Expand Up @@ -762,7 +770,7 @@ jobs:
uses: jwlawson/[email protected]

- name: Prepare MSVC
uses: ilammy/[email protected].0
uses: ilammy/[email protected].1
with:
arch: x86

Expand Down Expand Up @@ -815,7 +823,7 @@ jobs:
uses: jwlawson/[email protected]

- name: Prepare MSVC
uses: ilammy/[email protected].0
uses: ilammy/[email protected].1
with:
arch: x86

Expand Down Expand Up @@ -1067,6 +1075,9 @@ jobs:

- name: Update CMake
uses: jwlawson/[email protected]
# TEMPORARILY pin version because 3.26.0-rc1 is failing under macOS:
with:
cmake-version: '3.25.2'

- name: Run pip installs
run: |
Expand Down
17 changes: 14 additions & 3 deletions .github/workflows/ci_sh_def.yml
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,9 @@ jobs:

- name: Update CMake
uses: jwlawson/[email protected]
# TEMPORARILY pin version because 3.26.0-rc1 is failing under macOS:
with:
cmake-version: '3.25.2'

- name: Cache wheels
if: runner.os == 'macOS'
Expand Down Expand Up @@ -297,6 +300,8 @@ jobs:
- dev
std:
- 11
container_suffix:
- ""
include:
- clang: 5
std: 14
Expand All @@ -310,9 +315,12 @@ jobs:
std: 20
- clang: 14
std: 20
- clang: 15
std: 20
container_suffix: "-bullseye"

name: "🐍 3 • Clang ${{ matrix.clang }} • C++${{ matrix.std }} • x64"
container: "silkeh/clang:${{ matrix.clang }}"
container: "silkeh/clang:${{ matrix.clang }}${{ matrix.container_suffix }}"

steps:
- uses: actions/checkout@v3
Expand Down Expand Up @@ -784,7 +792,7 @@ jobs:
uses: jwlawson/[email protected]

- name: Prepare MSVC
uses: ilammy/[email protected].0
uses: ilammy/[email protected].1
with:
arch: x86

Expand Down Expand Up @@ -838,7 +846,7 @@ jobs:
uses: jwlawson/[email protected]

- name: Prepare MSVC
uses: ilammy/[email protected].0
uses: ilammy/[email protected].1
with:
arch: x86

Expand Down Expand Up @@ -1093,6 +1101,9 @@ jobs:

- name: Update CMake
uses: jwlawson/[email protected]
# TEMPORARILY pin version because 3.26.0-rc1 is failing under macOS:
with:
cmake-version: '3.25.2'

- name: Run pip installs
run: |
Expand Down
44 changes: 22 additions & 22 deletions .github/workflows/ci_sh_def.yml.patch
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
--- ci.yml 2023-01-03 19:40:01.489281529 -0800
+++ ci_sh_def.yml 2023-01-03 19:40:50.224704081 -0800
--- ci.yml 2023-02-07 05:27:15.243868883 -0800
+++ ci_sh_def.yml 2023-02-07 05:46:44.201895973 -0800
@@ -1,4 +1,16 @@
-name: CI
+# PLEASE KEEP THIS GROUP OF FILES IN SYNC AT ALL TIMES:
Expand Down Expand Up @@ -27,47 +27,47 @@
cancel-in-progress: true

env:
@@ -114,6 +126,7 @@
@@ -117,6 +129,7 @@
-DDOWNLOAD_CATCH=ON
-DDOWNLOAD_EIGEN=ON
-DCMAKE_CXX_STANDARD=11
+ -DCMAKE_CXX_FLAGS="-DPYBIND11_USE_SMART_HOLDER_AS_DEFAULT ${{runner.os == 'Windows' && '/GR /EHsc' || ''}}"
${{ matrix.args }}

- name: Build C++11
@@ -143,6 +156,7 @@
@@ -146,6 +159,7 @@
-DDOWNLOAD_CATCH=ON
-DDOWNLOAD_EIGEN=ON
-DCMAKE_CXX_STANDARD=17
+ -DCMAKE_CXX_FLAGS="-DPYBIND11_USE_SMART_HOLDER_AS_DEFAULT ${{runner.os == 'Windows' && '/GR /EHsc' || ''}}"
${{ matrix.args }}

- name: Build
@@ -164,6 +178,7 @@
@@ -167,6 +181,7 @@
-DDOWNLOAD_CATCH=ON
-DDOWNLOAD_EIGEN=ON
-DCMAKE_CXX_STANDARD=17
+ -DCMAKE_CXX_FLAGS="-DPYBIND11_USE_SMART_HOLDER_AS_DEFAULT ${{runner.os == 'Windows' && '/GR /EHsc' || ''}}"
-DPYBIND11_INTERNALS_VERSION=10000000
"-DPYBIND11_TEST_OVERRIDE=test_call_policies.cpp;test_gil_scoped.cpp;test_thread.cpp"
${{ matrix.args }}
@@ -251,6 +266,7 @@
@@ -254,6 +269,7 @@
-DDOWNLOAD_CATCH=ON
-DDOWNLOAD_EIGEN=ON
-DCMAKE_CXX_STANDARD=17
+ -DCMAKE_CXX_FLAGS="-DPYBIND11_USE_SMART_HOLDER_AS_DEFAULT"

- name: Build
run: cmake --build build -j 2
@@ -311,6 +327,7 @@
@@ -319,6 +335,7 @@
-DPYBIND11_WERROR=ON
-DDOWNLOAD_CATCH=ON
-DCMAKE_CXX_STANDARD=${{ matrix.std }}
+ -DCMAKE_CXX_FLAGS="-DPYBIND11_USE_SMART_HOLDER_AS_DEFAULT"
-DPYTHON_EXECUTABLE=$(python3 -c "import sys; print(sys.executable)")

- name: Build
@@ -340,7 +357,7 @@
@@ -348,7 +365,7 @@
run: apt-get update && DEBIAN_FRONTEND="noninteractive" apt-get install -y cmake git python3-dev python3-pytest python3-numpy

- name: Configure
Expand All @@ -76,7 +76,7 @@

- name: Build
run: cmake --build build -j2 --verbose
@@ -420,7 +437,7 @@
@@ -428,7 +445,7 @@
cmake3 -S . -B build -DDOWNLOAD_CATCH=ON \
-DCMAKE_CXX_STANDARD=11 \
-DPYTHON_EXECUTABLE=$(python3 -c "import sys; print(sys.executable)") \
Expand All @@ -85,71 +85,71 @@
-DPYBIND11_TEST_FILTER="test_smart_ptr.cpp"

# Building before installing Pip should produce a warning but not an error
@@ -479,6 +496,7 @@
@@ -487,6 +504,7 @@
-DPYBIND11_WERROR=ON
-DDOWNLOAD_CATCH=ON
-DCMAKE_CXX_STANDARD=${{ matrix.std }}
+ -DCMAKE_CXX_FLAGS="-DPYBIND11_USE_SMART_HOLDER_AS_DEFAULT"
-DPYTHON_EXECUTABLE=$(python3 -c "import sys; print(sys.executable)")

- name: Build
@@ -534,6 +552,7 @@
@@ -542,6 +560,7 @@
-DDOWNLOAD_CATCH=ON \
-DDOWNLOAD_EIGEN=OFF \
-DCMAKE_CXX_STANDARD=11 \
+ -DCMAKE_CXX_FLAGS="-DPYBIND11_USE_SMART_HOLDER_AS_DEFAULT" \
-DCMAKE_CXX_COMPILER=$(which icpc) \
-DPYTHON_EXECUTABLE=$(python3 -c "import sys; print(sys.executable)")

@@ -566,6 +585,7 @@
@@ -574,6 +593,7 @@
-DDOWNLOAD_CATCH=ON \
-DDOWNLOAD_EIGEN=OFF \
-DCMAKE_CXX_STANDARD=17 \
+ -DCMAKE_CXX_FLAGS="-DPYBIND11_USE_SMART_HOLDER_AS_DEFAULT" \
-DCMAKE_CXX_COMPILER=$(which icpc) \
-DPYTHON_EXECUTABLE=$(python3 -c "import sys; print(sys.executable)")

@@ -633,6 +653,7 @@
@@ -641,6 +661,7 @@
-DDOWNLOAD_CATCH=ON
-DDOWNLOAD_EIGEN=ON
-DCMAKE_CXX_STANDARD=11
+ -DCMAKE_CXX_FLAGS="-DPYBIND11_USE_SMART_HOLDER_AS_DEFAULT"
-DPYTHON_EXECUTABLE=$(python3 -c "import sys; print(sys.executable)")

- name: Build
@@ -683,6 +704,7 @@
@@ -691,6 +712,7 @@
cmake ../pybind11-tests
-DDOWNLOAD_CATCH=ON
-DPYBIND11_WERROR=ON
+ -DCMAKE_CXX_FLAGS="-DPYBIND11_USE_SMART_HOLDER_AS_DEFAULT"
-DPYTHON_EXECUTABLE=$(python3 -c "import sys; print(sys.executable)")
working-directory: /build-tests

@@ -778,6 +800,7 @@
@@ -786,6 +808,7 @@
-DPYBIND11_WERROR=ON
-DDOWNLOAD_CATCH=ON
-DDOWNLOAD_EIGEN=ON
+ -DCMAKE_CXX_FLAGS="/GR /EHsc /DPYBIND11_USE_SMART_HOLDER_AS_DEFAULT"
${{ matrix.args }}
- name: Build C++11
run: cmake --build build -j 2
@@ -832,6 +855,7 @@
@@ -840,6 +863,7 @@
-DPYBIND11_WERROR=ON
-DDOWNLOAD_CATCH=ON
-DDOWNLOAD_EIGEN=ON
+ -DCMAKE_CXX_FLAGS="/GR /EHsc /DPYBIND11_USE_SMART_HOLDER_AS_DEFAULT"
${{ matrix.args }}
- name: Build C++11
run: cmake --build build --config Debug -j 2
@@ -872,6 +896,7 @@
@@ -880,6 +904,7 @@
-DDOWNLOAD_CATCH=ON
-DDOWNLOAD_EIGEN=ON
-DCMAKE_CXX_STANDARD=20
+ -DCMAKE_CXX_FLAGS="/GR /EHsc /DPYBIND11_USE_SMART_HOLDER_AS_DEFAULT"

- name: Build C++20
run: cmake --build build -j 2
@@ -919,7 +944,7 @@
@@ -927,7 +952,7 @@
- name: Configure C++11
# LTO leads to many undefined reference like
# `pybind11::detail::function_call::function_call(pybind11::detail::function_call&&)
Expand All @@ -158,7 +158,7 @@

- name: Build C++11
run: cmake --build build -j 2
@@ -937,7 +962,7 @@
@@ -945,7 +970,7 @@
run: git clean -fdx

- name: Configure C++14
Expand All @@ -167,7 +167,7 @@

- name: Build C++14
run: cmake --build build2 -j 2
@@ -955,7 +980,7 @@
@@ -963,7 +988,7 @@
run: git clean -fdx

- name: Configure C++17
Expand All @@ -176,15 +176,15 @@

- name: Build C++17
run: cmake --build build3 -j 2
@@ -1022,6 +1047,7 @@
@@ -1030,6 +1055,7 @@
-DDOWNLOAD_EIGEN=ON
-DCMAKE_CXX_COMPILER=clang++
-DCMAKE_CXX_STANDARD=17
+ -DCMAKE_CXX_FLAGS="-DPYBIND11_USE_SMART_HOLDER_AS_DEFAULT"

- name: Build
run: cmake --build . -j 2
@@ -1087,6 +1113,7 @@
@@ -1098,6 +1124,7 @@
-DDOWNLOAD_EIGEN=ON
-DCMAKE_CXX_COMPILER=clang++
-DCMAKE_CXX_STANDARD=17
Expand Down
20 changes: 10 additions & 10 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -49,47 +49,47 @@ repos:

# Nicely sort includes
- repo: https://github.com/PyCQA/isort
rev: "5.11.4"
rev: "5.12.0"
hooks:
- id: isort

# Black, the code formatter, natively supports pre-commit
- repo: https://github.com/psf/black
rev: "22.12.0" # Keep in sync with blacken-docs
rev: "23.1.0" # Keep in sync with blacken-docs
hooks:
- id: black

# Also code format the docs
- repo: https://github.com/asottile/blacken-docs
rev: "v1.12.1"
rev: "1.13.0"
hooks:
- id: blacken-docs
additional_dependencies:
- black==22.10.0 # keep in sync with black hook
- black==23.1.0 # keep in sync with black hook

# Changes tabs to spaces
- repo: https://github.com/Lucas-C/pre-commit-hooks
rev: "v1.3.1"
rev: "v1.4.2"
hooks:
- id: remove-tabs
exclude: (^docs/.*|\.patch)?$

- repo: https://github.com/sirosen/texthooks
rev: "0.4.0"
rev: "0.5.0"
hooks:
- id: fix-ligatures
- id: fix-smartquotes

# Autoremoves unused imports
- repo: https://github.com/hadialqattan/pycln
rev: "v2.1.2"
rev: "v2.1.3"
hooks:
- id: pycln
stages: [manual]

# Checking for common mistakes
- repo: https://github.com/pre-commit/pygrep-hooks
rev: "v1.9.0"
rev: "v1.10.0"
hooks:
- id: python-check-blanket-noqa
- id: python-check-blanket-type-ignore
Expand Down Expand Up @@ -119,7 +119,7 @@ repos:

# PyLint has native support - not always usable, but works for us
- repo: https://github.com/PyCQA/pylint
rev: "v2.15.9"
rev: "v2.16.1"
hooks:
- id: pylint
files: ^pybind11
Expand Down Expand Up @@ -178,7 +178,7 @@ repos:

# Clang format the codebase automatically
- repo: https://github.com/pre-commit/mirrors-clang-format
rev: "v15.0.6"
rev: "v15.0.7"
hooks:
- id: clang-format
types_or: [c++, c, cuda]
1 change: 0 additions & 1 deletion docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -358,7 +358,6 @@ def clean_up(app, exception):


def setup(app):

# Add hook for building doxygen xml when needed
app.connect("builder-inited", generate_doxygen_xml)

Expand Down
Loading