Ralf W. Grosse-Kunstleve
6989f174ac
Experiment: commenting out test_class_sh_shared_from_this.
2021-06-30 07:04:31 -07:00
Ralf W. Grosse-Kunstleve
05bd93543b
Fully emulating type_caster_base-related behavior: trying shared_from_this also for unowned pointees.
2021-06-30 07:04:31 -07:00
Ralf W. Grosse-Kunstleve
e1de4e88b8
Adding test_class_sh_shared_from_this.cpp to tests/CMakeLists.txt.
2021-06-30 07:04:31 -07:00
Ralf W. Grosse-Kunstleve
775873d0b6
Adding from_raw_pointer_take_ownership_or_shared_from_this().
2021-06-30 07:04:31 -07:00
Ralf W. Grosse-Kunstleve
2a265860a7
enable_shared_from_this_from_raw_ptr_take_ownership_guard: better static_assert that also triggers for derived classes.
2021-06-30 07:04:31 -07:00
Ralf W. Grosse-Kunstleve
24c223ad8e
static_assert in from_raw_ptr_take_ownership, to be tested.
2021-06-30 07:04:31 -07:00
Ralf W. Grosse-Kunstleve
7a74bfede7
Restoring init_holder overload for std::enable_shared_from_this and original tests/test_smart_ptr.py.
2021-06-30 07:04:31 -07:00
Ralf W. Grosse-Kunstleve
e5b38a4459
Breaking up test_shared_ptr_from_this_and_references into smaller subtests. Skipping the only test that generates an ASAN heap-use-after-free.
2021-06-30 07:04:31 -07:00
Ralf W. Grosse-Kunstleve
94523e8a02
Experiments: 1. disabling enable_shared_from_this, 2. using smart_holder in test_class_sh_shared_from_this.cpp
2021-06-30 07:04:31 -07:00
Ralf W. Grosse-Kunstleve
252b6aefb8
Isolating shared_from_this tests from test_smart_ptr (minimal changes).
2021-06-30 07:04:31 -07:00
Jakob Lykke Andersen
b9241c0330
SM, remove type annotations in test
2021-06-29 05:57:32 -07:00
Jakob Lykke Andersen
f39efb850b
SH, attribute and property tests
2021-06-29 05:57:32 -07:00
Ralf W. Grosse-Kunstleve
fa5ffc3d02
Automatic clang-format.
2021-06-29 05:57:32 -07:00
Ralf W. Grosse-Kunstleve
a428f5755d
Automatic clang-tidy fixes.
2021-06-29 05:57:32 -07:00
Jakob Lykke Andersen
f06f0927b3
SH, history tracking
2021-06-29 05:57:32 -07:00
Jakob Lykke Andersen
0337ed944d
SH, fix use of PYBIND11_TYPE_CASTER_BASE_HOLDER
2021-06-29 05:57:32 -07:00
Jakob Lykke Andersen
ee53a45ffd
SH, fix typo
2021-06-29 05:57:32 -07:00
Jakob Lykke Andersen
b735093fde
SH, shared_ptr copy/move, rename to 'history'
2021-06-29 05:57:32 -07:00
Jakob Lykke Andersen
ef6907c1ae
SH, shared_ptr copy/move, make MSVC happy
2021-06-29 05:57:32 -07:00
Jakob Lykke Andersen
abf11b9d9a
SH, shared_ptr copy/move, update after review
2021-06-29 05:57:32 -07:00
Jakob Lykke Andersen
660f83e81d
SH, test for shared_ptr move
2021-06-29 05:57:32 -07:00
Jakob Lykke Andersen
2934913761
SH, test update
2021-06-29 05:57:32 -07:00
Jakob Lykke Andersen
fc548c067f
SH, update shared_ptr copy tests
2021-06-29 05:57:32 -07:00
Jakob Lykke Andersen
1f98d74761
Initial test
2021-06-29 05:57:32 -07:00
Cris Luengo
57a36633c4
fix: enable py::implicitly_convertible<py::none, ...> for py::class_-wrapped types ( #3059 )
...
* Allow casting from None to a custom object, closes #2778
* ci.yml patch from the smart_holder branch for full CI coverage.
2021-06-25 21:57:45 -07:00
Ralf W. Grosse-Kunstleve
2c828ff552
More clang-tidy fixes. These escaped before because -DDOWNLOAD_EIGEN=ON -DDOWNLOAD_CATCH=ON -DCMAKE_CXX_STANDARD=17
, as used in the GitHub Actions, were missing in the interactive run.
2021-06-22 14:42:47 -07:00
Ralf W. Grosse-Kunstleve
2eeac0c369
Applying clang-tidy fixes needed after merging PR #3051 (mostly automatically).
2021-06-22 13:38:30 -07:00
Ralf W. Grosse-Kunstleve
898d5b301c
Manually fixing merge conflict.
2021-06-22 12:19:40 -07:00
Aaron Gokaslan
dac74ebdf5
fix(clang-tidy): performance fixes applied in tests and CI ( #3051 )
...
* Initial fixes
* Whoops
* Finish clang-tidy manual fixes
* Add two missing fixes
* Revert
* Update clang-tidy
* Try to fix unreachable code error
* Move nolint comment
* Apply missing fix
* Don't override clang-tidy config
* Does this fix clang-tidy?
* Make all clang-tidy errors visible
* Add comments about NOLINTs and remove a few
* Fix typo
2021-06-22 12:11:54 -04:00
Ralf W. Grosse-Kunstleve
8d1e0b3903
[smart_holder] clang-tidy fixes (related to recent clang-tidy changes on master). ( #3053 )
...
* clang-tidy fixes (related to recent clang-tidy changes on master).
* More clang-tidy fixes.
2021-06-21 12:40:10 -07:00
Ralf W. Grosse-Kunstleve
274b014578
Merge branch 'master' into smart_holder
2021-06-21 07:51:19 -07:00
Aaron Gokaslan
3b30b0a51e
fix(clang-tidy): clang-tidy readability and misc fixes, like adding const ( #3052 )
...
* Enable and apply clang-tidy readability and misc fixes.
* Revert deprecated tester
* add space to tests/test_constants_and_functions.cpp
2021-06-21 10:37:48 -04:00
Ralf W. Grosse-Kunstleve
29fafcc1b2
Fixing clang-tidy error (related to PR #3049 ). ( #3050 )
...
Example:
```
test_class_sh_unique_ptr_member.cpp:17:5: error: deleted member function should be public [modernize-use-equals-delete,-warnings-as-errors]
pointee(const pointee &) = delete;
^
```
2021-06-19 16:51:09 -07:00
Ralf W. Grosse-Kunstleve
fb7452ce39
Merge branch 'master' into smart_holder
2021-06-19 15:52:36 -07:00
Aaron Gokaslan
e0b5cbd4c6
chore(clang-tidy): add more modernize clang-tidy checks ( #3049 )
...
* Add more modernize clang-tidy checks
* Enable a few more
2021-06-19 18:38:56 -04:00
Ralf W. Grosse-Kunstleve
48c7a3a68f
Merge branch 'master' into smart_holder
2021-06-08 12:05:19 -07:00
Jack S. Hale
4c7697dbe9
Add const T to docstring generation. ( #3020 )
...
* Add const T to docstring generation.
* Change order.
* See if existing test triggers for a const type.
* Add tests.
* Fix test.
* Remove experiment.
* Reformat.
* More tests, checks run.
* Adding `test_fmt_desc_` prefix to new test functions.
* Using pytest.mark.parametrize to 1. condense test; 2. exercise all functions even if one fails; 3. be less platform-specific (e.g. C++ float is not necessarily float32).
Co-authored-by: Ralf W. Grosse-Kunstleve <rwgk@google.com>
2021-06-08 11:56:45 -07:00
Ralf W. Grosse-Kunstleve
f5bc2040bf
Merge branch 'master' into smart_holder
2021-05-27 12:59:42 -07:00
Ralf W. Grosse-Kunstleve
e25b1505db
Adjusting valgrind suppression for pypocketfft to resolve systematic failures that started to appear on 2020-05-27. ( #3022 )
2021-05-27 12:51:46 -07:00
Ralf W. Grosse-Kunstleve
2cfc017e2d
Merge branch 'master' into smart_holder
2021-05-27 11:30:03 -07:00
Yichen
3ac690b88b
Explicitly export exception types. ( #2999 )
...
* Set visibility of exceptions to default.
Co-authored-by: XZiar <czktc2007@gmail.com>
* add test
* update docs
* Skip failed test.
2021-05-27 08:00:18 -07:00
Ralf W. Grosse-Kunstleve
29e46381e4
Merge branch 'master' into smart_holder
2021-05-06 09:48:55 -07:00
Eric Cousineau
b6ec0e950c
functions: Add doc on incorrect argument index ( #2979 )
...
test_call_policies: Explicitly check free-functions and static methods
2021-05-06 10:13:30 -04:00
Ralf W. Grosse-Kunstleve
6cca66b276
Merge branch 'master' into smart_holder
2021-05-03 22:15:44 -07:00
Ralf W. Grosse-Kunstleve
bc3cd8a8a8
Splitting out include/pybind11/detail/pragma_warning_block.h ( #2988 )
...
* Splitting out include/pybind11/detail/pragma_warning_block.h
* Always including pragma_warning_block.h before common.h (resolved 8 CI failures).
2021-05-03 22:08:04 -07:00
Pieter P
0c93a0f3fc
Fix Unicode support for ostream redirects ( #2982 )
...
* Crash when printing Unicode to redirected cout
Add failing tests
* Fix Unicode crashes redirected cout
* pythonbuf::utf8_remainder check end iterator
* Remove trailing whitespace and formatting iostream
* Avoid buffer overflow if ostream redirect races
This doesn't solve the actual race, but at least it now has a much lower
probability of reading past the end of the buffer even when data races
do occur.
2021-05-03 22:04:38 -07:00
Ralf W. Grosse-Kunstleve
7d093a1906
Merge branch 'master' into smart_holder
2021-04-21 12:36:53 -07:00
Henry Schreiner
5e4804bb66
tests: use master commit for pytest on 3.10 ( #2967 )
2021-04-21 13:30:01 -04:00
Ralf W. Grosse-Kunstleve
99de498b26
Bug fix: adding back !is_alias<Class>(ptr)
that were accidentally omitted. ( #2958 )
...
* Bug fix: adding back `!is_alias<Class>(ptr)` that were accidentally omitted.
* Introducing PYBIND11_SH_AVL, PYBIND11_SH_DEF macros. Applying PYBIND11_SH_DEF to test_factory_constructors.py to complete test coverage.
* Using PYBIND11_SH_DEF in test_methods_and_attributes.cpp, for more complete test coverage.
* Using PYBIND11_SH_DEF in test_multiple_inheritance.cpp, for more complete test coverage.
* Cleaning up test_classh_mock.cpp.
* Better explanations for PYBIND11_SH_AVL, PYBIND11_SH_DEF.
* Disabling 3.10-dev builds.
2021-04-19 10:54:37 -07:00
Ralf W. Grosse-Kunstleve
cf89b865bb
Adding documentation with associated test: Using py::classh but with fallback to classic pybind11
2021-04-14 15:00:56 -07:00