Commit Graph

2279 Commits

Author SHA1 Message Date
Ralf W. Grosse-Kunstleve 854a95b47d Merge branch 'master' into smart_holder 2021-06-22 15:16:14 -07:00
Ralf W. Grosse-Kunstleve 484b0f0433
Updating and slightly enhancing instructions for running clang-tidy. (#3055)
* Updating and slightly enhancing instructions for running clang-tidy.

* Making documented commands identical to workflow commands. Adding comment in workflow file pointing to documentation.
2021-06-22 15:12:58 -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 7f41bea169 Tracking ci.yml changes from master. 2021-06-19 15:56:08 -07:00
Ralf W. Grosse-Kunstleve fb7452ce39 Merge branch 'master' into smart_holder 2021-06-19 15:52:36 -07:00
Robert Schütz d00fc62931
use CMAKE_INSTALL_FULL_INCLUDEDIR (#3005) 2021-06-19 18:45:53 -04:00
dependabot[bot] 9b3b357706
chore(deps): bump ilammy/msvc-dev-cmd from 1.8.1 to 1.9.0 (#3027) 2021-06-19 18:39:54 -04: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 dca304f29e Merge branch 'master' into smart_holder 2021-06-19 10:55:20 -07:00
Aaron Gokaslan af6218ff78
fix(clang-tidy): Apply performance fixes from clang-tidy (#3046)
* Apply performance fixes from clang-tidy

* 2nd Round of Perf Optimizations

* 3rd round of fixes & handle false-positive

* Apply missing fix and clang-format

* Apply reviewer comment
2021-06-19 10:53:27 -07:00
Aaron Gokaslan c44b41e7c6
[SmartHolder] fix(clang-tidy): apply clang-tidy performance fixes (#3048)
* Apply clang-tidy performance fixes

* Fix bug introduced by double insert

* Revert all non-smart-holder changes
2021-06-18 12:43:31 -07:00
jbarlow83 79178e713d
fix(setup_helpers): try import multiprocessing.synchronize too (#3043) 2021-06-18 10:17:34 -04:00
Ralf W. Grosse-Kunstleve cc0402ef19 Tracking ci.yml changes from master. 2021-06-18 01:43:25 -07:00
Ralf W. Grosse-Kunstleve 516bdae115 Merge branch 'master' into smart_holder 2021-06-18 01:40:28 -07:00
Ralf W. Grosse-Kunstleve 19d99a87fe
Working around Centos 8 failure. (#3030)
* Experiment using -DCMAKE_BUILD_TYPE=Debug for Centos 8.

* Moving comment because the current placement seems to mess up the cmake command.

* Using `echo > VAR_XXX` and `$(cat VAR_XXX)` trick to emulate using variables (https://github.com/actions/starter-workflows/issues/68#issuecomment-524937002).
2021-06-18 01:35:36 -07:00
Ralf W. Grosse-Kunstleve c48f887cd8 Merge branch 'master' into smart_holder 2021-06-17 14:01:07 -07:00
Aaron Gokaslan b4b67f026b
Fix typos (#3044) 2021-06-17 13:39:59 -07:00
Aaron Gokaslan cd4b49a2c8
Update py::kwargs examples to pass by reference (#3038) 2021-06-17 13:20:17 -07:00
Ralf W. Grosse-Kunstleve 840eb84aff
Removing `std::get_deleter` `const_cast` to retest because the code has changed significantly. (#3045) 2021-06-17 13:13:21 -07:00
Ralf W. Grosse-Kunstleve 4f61912646
`py::smart_holder` `std::shared_ptr` deleter simplification & optimization. (#3041) 2021-06-16 17:47:22 -07:00
Ralf W. Grosse-Kunstleve 8f6ca71390 Disabling broken Centos 8 CI. 2021-06-08 12:16:57 -07:00
Ralf W. Grosse-Kunstleve a6b2aadf45 Merge branch 'smart_holder' of https://github.com/pybind/pybind11 into smart_holder 2021-06-08 12:15:34 -07: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
Robert Haschke 91f97ca401
smart_holder fixups (#3012)
* Drop constraints on casting of std::shared_ptr

std::shared_ptrs can be shared across python and C++ by design.

* Correctly report casting error

It is important to return an empty handle.
Simply returning None, would skip the error handling in
simple_collector / unpacking_collector, although a python exception is set.
A function call would then be processed with a (wrong) None argument!

* Return None for nullptr

* Revert "Drop constraints on casting of std::shared_ptr"

This reverts commit 7cf53ae8b4.
2021-05-28 06:35:50 -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 c47f6aaf43 Tracking ci.yml changes from master. 2021-05-27 11:31:54 -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
dependabot[bot] 14023c9cda
chore(deps): bump ilammy/msvc-dev-cmd from 1.8.0 to 1.8.1 (#3021) 2021-05-27 06:10:28 +00:00
Ralf W. Grosse-Kunstleve 1f99e8e63a Tracking ci.yml changes from master. 2021-05-21 13:44:41 -07:00
Ralf W. Grosse-Kunstleve 9be81c84fa Merge branch 'master' into smart_holder 2021-05-21 13:42:19 -07:00
dependabot[bot] f61855b9d8
chore(deps): bump ilammy/msvc-dev-cmd from 1 to 1.8.0 (#3001) 2021-05-13 23:21:13 -04:00
dependabot[bot] bc7cf6ef17
chore(deps): bump jwlawson/actions-setup-cmake from 1.8 to 1.9 (#3000) 2021-05-13 23:19:51 -04: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 b00a3f930e Merge branch 'master' into smart_holder 2021-05-06 00:21:03 -07:00
Akira Kawata 417fd120cc
Fix: fix typo of WITHOUT_SOABI (#2992) 2021-05-06 00:19:05 -07: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 2256f2a2e1 Updating ci_sh_def.yml, ci_sh_def.yml.patch after `git merge master`. Pushing directly for this mechanical update. 2021-04-22 06:33:17 -07:00