Skip to content

Commit 2ee1e64

Browse files
committed
Merge branch 'master' into sh_merge_master
2 parents d6d3fe8 + 287e4f2 commit 2ee1e64

26 files changed

+176
-136
lines changed

.clang-tidy

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,11 +25,12 @@ modernize-replace-random-shuffle,
2525
modernize-shrink-to-fit,
2626
modernize-use-auto,
2727
modernize-use-bool-literals,
28+
modernize-use-default-member-init,
2829
modernize-use-equals-default,
2930
modernize-use-equals-delete,
30-
modernize-use-default-member-init,
31-
modernize-use-noexcept,
3231
modernize-use-emplace,
32+
modernize-use-noexcept,
33+
modernize-use-nullptr,
3334
modernize-use-override,
3435
modernize-use-using,
3536
*performance*,

.github/dependabot.yml

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,5 @@ updates:
77
interval: "daily"
88
ignore:
99
# Official actions have moving tags like v1
10-
# that are used, so they don't need updates here
11-
- dependency-name: "actions/checkout"
12-
- dependency-name: "actions/setup-python"
13-
- dependency-name: "actions/cache"
14-
- dependency-name: "actions/upload-artifact"
15-
- dependency-name: "actions/download-artifact"
16-
- dependency-name: "actions/labeler"
10+
- dependency-name: "actions/*"
11+
update-types: ["version-update:semver-minor", "version-update:semver-patch"]

.github/workflows/ci.yml

Lines changed: 22 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -63,10 +63,10 @@ jobs:
6363
runs-on: ${{ matrix.runs-on }}
6464

6565
steps:
66-
- uses: actions/checkout@v2
66+
- uses: actions/checkout@v3
6767

6868
- name: Setup Python ${{ matrix.python }}
69-
uses: actions/setup-python@v2
69+
uses: actions/setup-python@v3
7070
with:
7171
python-version: ${{ matrix.python }}
7272

@@ -84,7 +84,7 @@ jobs:
8484

8585
- name: Cache wheels
8686
if: runner.os == 'macOS'
87-
uses: actions/cache@v2
87+
uses: actions/cache@v3
8888
with:
8989
# This path is specific to macOS - we really only need it for PyPy NumPy wheels
9090
# See https://github.com/actions/cache/blob/master/examples.md#python---pip
@@ -193,7 +193,7 @@ jobs:
193193
runs-on: ubuntu-latest
194194

195195
steps:
196-
- uses: actions/checkout@v2
196+
- uses: actions/checkout@v3
197197

198198
- name: Setup Python ${{ matrix.python-version }} (deadsnakes)
199199
uses: deadsnakes/action@v2.1.1
@@ -206,7 +206,7 @@ jobs:
206206

207207
- name: Valgrind cache
208208
if: matrix.valgrind
209-
uses: actions/cache@v2
209+
uses: actions/cache@v3
210210
id: cache-valgrind
211211
with:
212212
path: valgrind
@@ -286,7 +286,7 @@ jobs:
286286
container: "silkeh/clang:${{ matrix.clang }}"
287287

288288
steps:
289-
- uses: actions/checkout@v2
289+
- uses: actions/checkout@v3
290290

291291
- name: Add wget and python3
292292
run: apt-get update && apt-get install -y python3-dev python3-numpy python3-pytest libeigen3-dev
@@ -320,7 +320,7 @@ jobs:
320320
container: nvidia/cuda:11.0-devel-ubuntu20.04
321321

322322
steps:
323-
- uses: actions/checkout@v2
323+
- uses: actions/checkout@v3
324324

325325
# tzdata will try to ask for the timezone, so set the DEBIAN_FRONTEND
326326
- name: Install 🐍 3
@@ -344,7 +344,7 @@ jobs:
344344
# container: centos:8
345345
#
346346
# steps:
347-
# - uses: actions/checkout@v2
347+
# - uses: actions/checkout@v3
348348
#
349349
# - name: Add Python 3 and a few requirements
350350
# run: yum update -y && yum install -y git python3-devel python3-numpy python3-pytest make environment-modules
@@ -387,7 +387,7 @@ jobs:
387387
container: centos:7
388388

389389
steps:
390-
- uses: actions/checkout@v2
390+
- uses: actions/checkout@v3
391391

392392
- name: Add Python 3 and a few requirements
393393
run: yum update -y && yum install -y epel-release && yum install -y git python3-devel make environment-modules cmake3
@@ -448,7 +448,7 @@ jobs:
448448
container: "gcc:${{ matrix.gcc }}"
449449

450450
steps:
451-
- uses: actions/checkout@v1
451+
- uses: actions/checkout@v3
452452

453453
- name: Add Python 3
454454
run: apt-get update; apt-get install -y python3-dev python3-numpy python3-pytest python3-pip libeigen3-dev
@@ -490,7 +490,7 @@ jobs:
490490
name: "🐍 3 • ICC latest • x64"
491491

492492
steps:
493-
- uses: actions/checkout@v2
493+
- uses: actions/checkout@v3
494494

495495
- name: Add apt repo
496496
run: |
@@ -593,7 +593,7 @@ jobs:
593593
container: "quay.io/centos/centos:${{ matrix.centos }}"
594594

595595
steps:
596-
- uses: actions/checkout@v2
596+
- uses: actions/checkout@v3
597597

598598
- name: Add Python 3
599599
run: yum update -y && yum install -y python3-devel gcc-c++ make git
@@ -636,7 +636,7 @@ jobs:
636636
container: i386/debian:buster
637637

638638
steps:
639-
- uses: actions/checkout@v1
639+
- uses: actions/checkout@v3
640640

641641
- name: Install requirements
642642
run: |
@@ -679,9 +679,9 @@ jobs:
679679
runs-on: ubuntu-latest
680680

681681
steps:
682-
- uses: actions/checkout@v2
682+
- uses: actions/checkout@v3
683683

684-
- uses: actions/setup-python@v2
684+
- uses: actions/setup-python@v3
685685

686686
- name: Install Doxygen
687687
run: sudo apt-get install -y doxygen librsvg2-bin # Changed to rsvg-convert in 20.04
@@ -726,10 +726,10 @@ jobs:
726726
runs-on: windows-2019
727727

728728
steps:
729-
- uses: actions/checkout@v2
729+
- uses: actions/checkout@v3
730730

731731
- name: Setup Python ${{ matrix.python }}
732-
uses: actions/setup-python@v2
732+
uses: actions/setup-python@v3
733733
with:
734734
python-version: ${{ matrix.python }}
735735
architecture: x86
@@ -779,10 +779,10 @@ jobs:
779779
runs-on: windows-2019
780780

781781
steps:
782-
- uses: actions/checkout@v2
782+
- uses: actions/checkout@v3
783783

784784
- name: Setup Python ${{ matrix.python }}
785-
uses: actions/setup-python@v2
785+
uses: actions/setup-python@v3
786786
with:
787787
python-version: ${{ matrix.python }}
788788
architecture: x86
@@ -827,10 +827,10 @@ jobs:
827827
runs-on: windows-2022
828828

829829
steps:
830-
- uses: actions/checkout@v2
830+
- uses: actions/checkout@v3
831831

832832
- name: Setup Python ${{ matrix.python }}
833-
uses: actions/setup-python@v2
833+
uses: actions/setup-python@v3
834834
with:
835835
python-version: ${{ matrix.python }}
836836

@@ -890,7 +890,7 @@ jobs:
890890
mingw-w64-${{matrix.env}}-boost
891891
mingw-w64-${{matrix.env}}-catch
892892
893-
- uses: actions/checkout@v2
893+
- uses: actions/checkout@v3
894894

895895
- name: Configure C++11
896896
# LTO leads to many undefined reference like

.github/workflows/configure.yml

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

4040
steps:
41-
- uses: actions/checkout@v2
41+
- uses: actions/checkout@v3
4242

4343
- name: Setup Python 3.7
44-
uses: actions/setup-python@v2
44+
uses: actions/setup-python@v3
4545
with:
4646
python-version: 3.7
4747
architecture: ${{ matrix.arch }}

.github/workflows/format.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,8 @@ jobs:
2121
name: Format
2222
runs-on: ubuntu-latest
2323
steps:
24-
- uses: actions/checkout@v2
25-
- uses: actions/setup-python@v2
24+
- uses: actions/checkout@v3
25+
- uses: actions/setup-python@v3
2626
- name: Add matchers
2727
run: echo "::add-matcher::$GITHUB_WORKSPACE/.github/matchers/pylint.json"
2828
- uses: pre-commit/action@v2.0.3
@@ -37,7 +37,7 @@ jobs:
3737
runs-on: ubuntu-latest
3838
container: silkeh/clang:12
3939
steps:
40-
- uses: actions/checkout@v2
40+
- uses: actions/checkout@v3
4141

4242
- name: Install requirements
4343
run: apt-get update && apt-get install -y python3-dev python3-pytest

.github/workflows/pip.yml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -25,10 +25,10 @@ jobs:
2525
runs-on: windows-latest
2626

2727
steps:
28-
- uses: actions/checkout@v2
28+
- uses: actions/checkout@v3
2929

3030
- name: Setup 🐍 3.6
31-
uses: actions/setup-python@v2
31+
uses: actions/setup-python@v3
3232
with:
3333
python-version: 3.6
3434

@@ -47,10 +47,10 @@ jobs:
4747
runs-on: ubuntu-latest
4848

4949
steps:
50-
- uses: actions/checkout@v2
50+
- uses: actions/checkout@v3
5151

5252
- name: Setup 🐍 3.8
53-
uses: actions/setup-python@v2
53+
uses: actions/setup-python@v3
5454
with:
5555
python-version: 3.8
5656

@@ -70,13 +70,13 @@ jobs:
7070
run: twine check dist/*
7171

7272
- name: Save standard package
73-
uses: actions/upload-artifact@v2
73+
uses: actions/upload-artifact@v3
7474
with:
7575
name: standard
7676
path: dist/pybind11-*
7777

7878
- name: Save global package
79-
uses: actions/upload-artifact@v2
79+
uses: actions/upload-artifact@v3
8080
with:
8181
name: global
8282
path: dist/pybind11_global-*
@@ -91,10 +91,10 @@ jobs:
9191
needs: [packaging]
9292

9393
steps:
94-
- uses: actions/setup-python@v2
94+
- uses: actions/setup-python@v3
9595

9696
# Downloads all to directories matching the artifact names
97-
- uses: actions/download-artifact@v2
97+
- uses: actions/download-artifact@v3
9898

9999
- name: Publish standard package
100100
uses: pypa/gh-action-pypi-publish@v1.5.0

.github/workflows/upstream.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,10 @@ jobs:
1919
if: "contains(github.event.pull_request.labels.*.name, 'python dev')"
2020

2121
steps:
22-
- uses: actions/checkout@v2
22+
- uses: actions/checkout@v3
2323

2424
- name: Setup Python 3.11
25-
uses: actions/setup-python@v2
25+
uses: actions/setup-python@v3
2626
with:
2727
python-version: "3.11-dev"
2828

.pre-commit-config.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ repos:
7373

7474
# Autoremoves unused imports
7575
- repo: https://github.com/hadialqattan/pycln
76-
rev: "v1.2.5"
76+
rev: "v1.3.1"
7777
hooks:
7878
- id: pycln
7979
stages: [manual]
@@ -167,7 +167,7 @@ repos:
167167

168168
# Clang format the codebase automatically
169169
- repo: https://github.com/pre-commit/mirrors-clang-format
170-
rev: "v13.0.1"
170+
rev: "v14.0.1"
171171
hooks:
172172
- id: clang-format
173173
types_or: [c++, c, cuda]

include/pybind11/attr.h

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010

1111
#pragma once
1212

13+
#include "detail/common.h"
1314
#include "cast.h"
1415

1516
#include <functional>
@@ -477,7 +478,7 @@ struct process_attribute<arg_v> : process_attribute_default<arg_v> {
477478
}
478479

479480
if (!a.value) {
480-
#if !defined(NDEBUG)
481+
#if defined(PYBIND11_DETAILED_ERROR_MESSAGES)
481482
std::string descr("'");
482483
if (a.name) {
483484
descr += std::string(a.name) + ": ";
@@ -498,7 +499,8 @@ struct process_attribute<arg_v> : process_attribute_default<arg_v> {
498499
#else
499500
pybind11_fail("arg(): could not convert default argument "
500501
"into a Python object (type not registered yet?). "
501-
"Compile in debug mode for more information.");
502+
"#define PYBIND11_DETAILED_ERROR_MESSAGES or compile in debug mode for "
503+
"more information.");
502504
#endif
503505
}
504506
r->args.emplace_back(a.name, a.descr, a.value.inc_ref(), !a.flag_noconvert, a.flag_none);

0 commit comments

Comments
 (0)