Skip to content

Commit 580f37c

Browse files
author
Dilawar Singh
authored
Merge pull request #119 from dilawar/issue_118
fix: Fix issue 118
2 parents f8e18de + 5f136c3 commit 580f37c

File tree

87 files changed

+4891
-545
lines changed

Some content is hidden

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

87 files changed

+4891
-545
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
## Changelog
22

3+
### 2.67.3 (3/17/22)
4+
5+
- Fixes to issue #118. Thanks Philip Luthert for reporting.
6+
37
### 2.67.2 (1/12/22)
48

59
- Fixes to graphics on OSX (#117).

scripts/update_pybind11.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
#!/usr/bin/env bash
22
git subtree pull --prefix source/pybind11 \
3-
https://github.com/pybind/pybind11 v2.8 --squash
3+
https://github.com/pybind/pybind11 v2.9.1 --squash

source/pybind11/.clang-tidy

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ readability-simplify-subscript-expr,
4646
readability-static-accessed-through-instance,
4747
readability-static-definition-in-anonymous-namespace,
4848
readability-string-compare,
49+
readability-suspicious-call-argument,
4950
readability-uniqueptr-delete-release,
5051
-bugprone-exception-escape,
5152
-bugprone-reserved-identifier,

source/pybind11/.clang-tidy.orig

Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
FormatStyle: file
2+
3+
Checks: '
4+
*bugprone*,
5+
cppcoreguidelines-init-variables,
6+
cppcoreguidelines-slicing,
7+
clang-analyzer-optin.cplusplus.VirtualCall,
8+
google-explicit-constructor,
9+
llvm-namespace-comment,
10+
misc-misplaced-const,
11+
misc-non-copyable-objects,
12+
misc-static-assert,
13+
misc-throw-by-value-catch-by-reference,
14+
misc-uniqueptr-reset-release,
15+
misc-unused-parameters,
16+
modernize-avoid-bind,
17+
modernize-make-shared,
18+
modernize-redundant-void-arg,
19+
modernize-replace-auto-ptr,
20+
modernize-replace-disallow-copy-and-assign-macro,
21+
modernize-replace-random-shuffle,
22+
modernize-shrink-to-fit,
23+
modernize-use-auto,
24+
modernize-use-bool-literals,
25+
modernize-use-equals-default,
26+
modernize-use-equals-delete,
27+
modernize-use-default-member-init,
28+
modernize-use-noexcept,
29+
modernize-use-emplace,
30+
modernize-use-override,
31+
modernize-use-using,
32+
*performance*,
33+
readability-avoid-const-params-in-decls,
34+
readability-const-return-type,
35+
readability-container-size-empty,
36+
readability-delete-null-pointer,
37+
readability-else-after-return,
38+
readability-implicit-bool-conversion,
39+
readability-make-member-function-const,
40+
readability-misplaced-array-index,
41+
readability-non-const-parameter,
42+
readability-redundant-function-ptr-dereference,
43+
readability-redundant-smartptr-get,
44+
readability-redundant-string-cstr,
45+
readability-simplify-subscript-expr,
46+
readability-static-accessed-through-instance,
47+
readability-static-definition-in-anonymous-namespace,
48+
readability-string-compare,
49+
readability-suspicious-call-argument,
50+
readability-uniqueptr-delete-release,
51+
-bugprone-exception-escape,
52+
-bugprone-reserved-identifier,
53+
-bugprone-unused-raii,
54+
'
55+
56+
CheckOptions:
57+
- key: performance-for-range-copy.WarnOnAllAutoCopies
58+
value: true
59+
- key: performance-unnecessary-value-param.AllowedTypes
60+
value: 'exception_ptr$;'
61+
- key: readability-implicit-bool-conversion.AllowPointerConditions
62+
value: true
63+
64+
HeaderFilterRegex: 'pybind11/.*h'
65+
66+
WarningsAsErrors: '*'

source/pybind11/.github/CONTRIBUTING.md

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ The valid options are:
120120
* `-DPYBIND11_NOPYTHON=ON`: Disable all Python searching (disables tests)
121121
* `-DBUILD_TESTING=ON`: Enable the tests
122122
* `-DDOWNLOAD_CATCH=ON`: Download catch to build the C++ tests
123-
* `-DOWNLOAD_EIGEN=ON`: Download Eigen for the NumPy tests
123+
* `-DDOWNLOAD_EIGEN=ON`: Download Eigen for the NumPy tests
124124
* `-DPYBIND11_INSTALL=ON/OFF`: Enable the install target (on by default for the
125125
master project)
126126
* `-DUSE_PYTHON_INSTALL_DIR=ON`: Try to install into the python dir
@@ -159,8 +159,20 @@ tests with these targets:
159159
* `test_cmake_build`: Install / subdirectory tests
160160

161161
If you want to build just a subset of tests, use
162-
`-DPYBIND11_TEST_OVERRIDE="test_callbacks.cpp;test_pickling.cpp"`. If this is
163-
empty, all tests will be built.
162+
`-DPYBIND11_TEST_OVERRIDE="test_callbacks;test_pickling"`. If this is
163+
empty, all tests will be built. Tests are specified without an extension if they need both a .py and
164+
.cpp file.
165+
166+
You may also pass flags to the `pytest` target by editing `tests/pytest.ini` or
167+
by using the `PYTEST_ADDOPTS` environment variable
168+
(see [`pytest` docs](https://docs.pytest.org/en/2.7.3/customize.html#adding-default-options)). As an example:
169+
170+
```bash
171+
env PYTEST_ADDOPTS="--capture=no --exitfirst" \
172+
cmake --build build --target pytest
173+
# Or using abbreviated flags
174+
env PYTEST_ADDOPTS="-s -x" cmake --build build --target pytest
175+
```
164176

165177
You may also pass flags to the `pytest` target by editing `tests/pytest.ini` or
166178
by using the `PYTEST_ADDOPTS` environment variable

0 commit comments

Comments
 (0)