* Resolve flake8 error by replacing `pytest.raises(Exception)` with `SystemError`
* Also remove the obsolete comment.
* Tweak comment instead of removing it.
* Make sure to properly untrack gc objects before freeing them
* style: pre-commit fixes
* Fix lint
* Add comment about where the original track comes from
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
* docs: update changelog for v2.10.3
Signed-off-by: Henry Schreiner <henryschreineriii@gmail.com>
* chore: bump versions for 2.10.3
Signed-off-by: Henry Schreiner <henryschreineriii@gmail.com>
* chore: fix make changelog script with entry is empty
Signed-off-by: Henry Schreiner <henryschreineriii@gmail.com>
Signed-off-by: Henry Schreiner <henryschreineriii@gmail.com>
* Remove clang 10 C++20 (it broke recently), add clang 15 C++20 while we are at it.
* No luck trying clang15: Error response from daemon: manifest for silkeh/clang:15 not found: manifest unknown: manifest unknown. Giving up, this needs to be a separate PR.
* chore: update clang-tidy to 15
* Add git
* Add NOLINTNEXTLINE for assignment in if
* Update CONTRIBUTING.md
* Add NOLINTNEXTLINE where needed
* Add one more NOLINTNEXTLINE
* stl_bind: make more readable
* Another missing NOLINTNEXTLINE
* Match style elsewhere
* Apply reviewer suggestion. Mark false positive
* docs: changelog for next version
Signed-off-by: Henry Schreiner <henryschreineriii@gmail.com>
* docs: address feedback
Signed-off-by: Henry Schreiner <henryschreineriii@gmail.com>
Signed-off-by: Henry Schreiner <henryschreineriii@gmail.com>
* Revert "Systematically add `-DCMAKE_VERBOSE_MAKEFILE=ON` to obtain full command lines related to `-Wodr` (#4398)"
This reverts commit ff42f5254a.
* Set `env: VERBOSE: 1` as suggested by @henryiii
* Set `env: VERBOSE: 1` also in all other .yml files using cmake
* Content of PR #4374 applied on top of smart_holder branch.
* More tests, with USE_SH switch. [ci skip]
* Use `std::dynamic_pointer_cast<Base0>` [ci skip]
* All tests pass when using `m.make_derived_as_base0_raw_ptr()`, with `USE_SH` defined or not defined. [ci skip]
* WIP
* Debug LOOOK & one-line bug fix:
```diff
- auto smhldr = pybindit::memory::smart_holder::from_shared_ptr(src);
+ auto smhldr = pybindit::memory::smart_holder::from_shared_ptr(std::shared_ptr<void>(src, const_cast<void *>(st.first)));
```
* Remove all print LOOOK and clang-format the fix.
* Resolve clang-tidy errors.
* Systematic test matrix.
* Bug fix in `smart_holder_type_caster<std::unique_ptr<T, D>>::cast()`
* Rename: test_mi_debug -> test_class_sh_mi_thunks
* Add `test_ptrdiff_derived_base0()`
* Miscellaneous polishing (naming, comments). No functional changes.
* Improve test_class_sh_mi_thunks.py implementation. No change in test coverage.
* Resolve clang-tidy error.
* Create templated abstract classes KeysView, ValuesView and ItemsView, and implement them on-the-fly when wrapping any specific map type
* We don't want to wrap different ValuesView objects for double values and const double, for example, as both wrappers will be named ValuesView[float]
* Fallback to C++ names if key or values types are not wrapped
* Added a test for .keys(), .values() and .items() returning the same types for similarly-typed maps
* Fixed wrong use of auto in a declarator list: the two descriptions might have different types
* Fixes for clang-tidy issues: explicit single-argument constructor, using the 'override' keyword when overriding functions
* Bugfix for old versions of clang++, which seem to have trouble with the struct being defined inside a module, which was also needlessly ugly anyway
* Bugfix for clang++, which doesn't have some of the names in runtime uness they are specified to be static
* A fix for clang-tidy performance-inefficient-string-concatenation issues - I personally think this looks uglier, but it's probably worth it for clang-tidy to be happy
* Possible fix for clang++ linking issues - make the descriptions static constexpr to make sure they are known before linking
* Correct names for previously-wrapped types as keys/values of maps
* Bugfix - typo in type info names which caused things to segfault
* Apply suggestions from code review
Co-authored-by: Aaron Gokaslan <skylion.aaron@gmail.com>
* Use detail::remove_cvref_t instead of doing remove_cv and remove_reference separately
* Avoid names with double underscore, as they are reserved
* Improved testing for KeysView, ValuesView and ItemsView: check type names + stricter asserts
* Moved description logic to helper function in type_caster_base.h
* style: pre-commit fixes
* Fix a clang-tidy issue: do not use 'else' after 'return'
* Apply suggestion by @Skylion007, with additional trivial simplification.
Co-authored-by: Amir <aimir@local>
Co-authored-by: aimir <aimir@localhost>
Co-authored-by: Aaron Gokaslan <skylion.aaron@gmail.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Ralf W. Grosse-Kunstleve <rwgk@google.com>
* Auto select return value policy for clif_automatic
* Try fixing test failures
* Add more tests.
* remove comments
* Fix test failures
* Fix test failures
* Fix test failure for windows platform
* Fix clangtidy
* Replace 🐍 3.6 • ubuntu-latest • x64 -DPYBIND11_FINDPYTHON=ON -DCMAKE_CXX_FLAGS="-D_=1" with 3.9
* Revert "Replace 🐍 3.6 • ubuntu-latest • x64 -DPYBIND11_FINDPYTHON=ON -DCMAKE_CXX_FLAGS="-D_=1" with 3.9"
This reverts commit 3ec984e1ed.
* Systematically change all active ubuntu-latest to ubuntu-20.04, except in upstream.yml
* Revert "Systematically change all active ubuntu-latest to ubuntu-20.04, except in upstream.yml"
This reverts commit cdfd99526a.
* Change only some ubuntu-latest to ubuntu-20.04