1. 26 Aug, 2021 4 commits
    • view for numpy arrays (#987) · 503ff2a6
      * reshape
      
      * more tests
      
      * Update numpy.h
      
      * Update test_numpy_array.py
      
      * array view
      
      * test
      
      * Update test_numpy_array.cpp
      
      * Update numpy.h
      
      * Update numpy.h
      
      * Update test_numpy_array.cpp
      
      * [pre-commit.ci] auto fixes from pre-commit.com hooks
      
      for more information, see https://pre-commit.ci
      
      * Fix merge bug
      
      * Make clang-tidy happy
      
      * Add xfail for PyPy
      
      * Fix casting issue
      
      * Fix formatting
      
      * Apply clang-tidy
      
      * Address reviews on additional tests
      
      * Fix ordering
      
      * Do a little more reordering
      
      * Fix typo
      
      * Try improving tests
      
      * Fix error in reshape
      
      * Add one more reshape test
      
      * Fix bugs and add test
      
      * Relax test
      
      * streamlining new tests; removing a few stray msg
      
      * Fix style revert
      
      * Fix clang-tidy
      
      * Misc tweaks:
      * Comment: matching style in file (///), responsibility sentence, consistent punctuation.
      * Replacing `unsigned char` with `uint8_t` for max consistency.
      * Removing `1` from `array_view1` because there is only one.
      
      * Partial clang-format-diff.
      
      Co-authored-by: ncullen93 <ncullen.th@dartmouth.edu>
      Co-authored-by: NC Cullen <nicholas.c.cullen.th@dartmouth.edu>
      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 Grosse-Kunstleve <rwgk@google.com>
      Nick Cullen committed
    • reshape for numpy arrays (#984) · 59ad1e7d
      * reshape
      
      * more tests
      
      * Update numpy.h
      
      * Update test_numpy_array.py
      
      * Update numpy.h
      
      * Update numpy.h
      
      * Update test_numpy_array.cpp
      
      * [pre-commit.ci] auto fixes from pre-commit.com hooks
      
      for more information, see https://pre-commit.ci
      
      * Fix merge bug
      
      * Make clang-tidy happy
      
      * Add xfail for PyPy
      
      * Fix casting issue
      
      * Address reviews on additional tests
      
      * Fix ordering
      
      * Do a little more reordering
      
      * Fix typo
      
      * Try improving tests
      
      * Fix error in reshape
      
      * Add one more reshape test
      
      * streamlining new tests; removing a few stray msg
      
      Co-authored-by: ncullen93 <ncullen.th@dartmouth.edu>
      Co-authored-by: NC Cullen <nicholas.c.cullen.th@dartmouth.edu>
      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 Grosse-Kunstleve <rwgk@google.com>
      Nick Cullen committed
    • Add make_simple_namespace function and tests (#2840) · 031a700d
      Co-authored-by: Jouke Witteveen <j.witteveen@cosine.nl>
      Jouke Witteveen committed
  2. 24 Aug, 2021 1 commit
  3. 23 Aug, 2021 3 commits
  4. 19 Aug, 2021 2 commits
    • ci: extend msys2 mingw CI (#3207) · 4f29b8a4
      * extend msys2 CI
      
      - add 32-bit job
      - add c++11/17 c++/interface tests copied from standard ci
      - add numpy/scipy
      
      * account for padding of PartialStruct in numpy dtypes test with mingw32
      
      * [pre-commit.ci] auto fixes from pre-commit.com hooks
      
      for more information, see https://pre-commit.ci
      
      * msys2 ci: add c++14 tests
      
      Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
      Liam Keegan committed
    • Cleanup of file-scoped and globally-scoped warning suppression pragmas across… · 998d45e4
      Cleanup of file-scoped and globally-scoped warning suppression pragmas across pybind11 header files. (#3201)
      
      * Removing all MSVC C4127 warning suppression pragmas.
      
      * Removing MSVC /WX (WERROR). To get a full list of all warnings.
      
      * Inserting PYBIND11_SILENCE_MSVC_C4127. Changing one runtime if to #if.
      
      * Changing PYBIND11_SILENCE_MSVC_C4127 macro to use absolute namespace (for use outside pybind11 include directory).
      
      * Restoring MSVC /WX (WERROR).
      
      * Removing globally-scoped suppression for clang -Wunsequenced. Based on an experiment under PR #3202 it is obsolete and can simply be removed.
      Ralf W. Grosse-Kunstleve committed
  5. 17 Aug, 2021 1 commit
    • Removing obsolete eigen.h warning suppression pragmas. (#3198) · 774b5ff9
      * Removing all pragma from eigen.h
      
      * Removing -Werror or equivalent from tests/CMakeLists.txt
      
      * Restoring tests/CMakeLists.txt from master.
      
      * Adding 4 PYBIND11_SILENCE_MSVC_C4127.
      
      * Compatibility with -Wconversion, -Wdeprecated
      
      * Introducing PYBIND11_COMPATIBILITY_WDEPRECATED_COPY
      
      * Systematically using --verbose for compilations where possible (cmake 3.14 or newer).
      
      Also changing all `cmake -t` to `--target`, `-v` to `--verbose`, `check` to `pytest`, for consistency (to make it easier to pin-point all commands of a certain type).
      
      Also removing one `-j 2` for `pytest` in hopes of reducing flakes due to races in test_iostream and in prints from destructors.
      
      * Commenting out pragmas as an experiment to reproduce previous observation.
      
      * Removing all (newly added, but already commented-out) pragma code, adding HINT use -isystem (as cmake does).
      
      * Restoring ci.yml from master. Those changes are better handled separately. BTW: in the last CI run there was still a test_iostream flake, even without the -j 2 for running the tests (verfied by inspecting the log).
      Ralf W. Grosse-Kunstleve committed
  6. 14 Aug, 2021 2 commits
    • [Bugfix] Fix errant const methods (#3194) · 617cb653
      * Fix errant const methods
      
      * Remove NOLINT since clang-tidy is pretty conservative
      
      * Missed one
      
      * Fix a few more errors
      
      * Add reviewer suggested comments
      
      * Run clang-format
      Aaron Gokaslan committed
    • Removing last remnants of pragma block at the top of pybind11.h (#3186) · 1bcd94c4
      * Removing last remnants of pragma block at the top of pybind11.h, defaulting CUDA, GCC7, GCC8 to PYBIND11_NOINLINE_DISABLED, with the option to define PYBIND11_NOINLINE_FORCED.
      
      * Unique SOSIZE prefix to make it easier to extract the sosizes from the GitHub logs.
      
      * Commenting out PYBIND11_WERROR block, for noinline testing.
      
      * Undoing accidental change.
      
      * `#define PYBIND11_NOINLINE_FORCED`
      
      * [pre-commit.ci] auto fixes from pre-commit.com hooks
      
      for more information, see https://pre-commit.ci
      
      * `#define PYBIND11_NOINLINE_DISABLED`
      
      * Going back to default (removing `#define PYBIND11_NOINLINE_DISABLED`).
      
      * `#define PYBIND11_NOINLINE_FORCED`
      
      * Undoing all changes releated to measuring sosizes.
      
      * Rollback of PR #3030 (Working around Centos 8 failure).
      
      * Disabling -Werror for GNU (experiment).
      
      * Commenting out the entire `if(PYBIND11_WERROR)` again (although that is not expected to make a difference, but who knows what I am overlooking).
      
      * Adding `-DCMAKE_BUILD_TYPE=Release`
      
      * Undoing change to tests/CMakeLists.txt (uncommenting `if(PYBIND11_WERROR)` block).
      
      * post `git rebase master -X theirs` fixups.
      
      * Adding measurements to comment for `PYBIND11_NOINLINE_FORCED`.
      
      Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
      Ralf W. Grosse-Kunstleve committed
  7. 13 Aug, 2021 2 commits
  8. 12 Aug, 2021 1 commit
  9. 09 Aug, 2021 3 commits
    • [pre-commit.ci] pre-commit autoupdate (#3185) · 0be2ea06
      updates:
      - [github.com/asottile/pyupgrade: v2.23.1 → v2.23.3](https://github.com/asottile/pyupgrade/compare/v2.23.1...v2.23.3)
      
      Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
      pre-commit-ci[bot] committed
    • PYBIND11_NOINLINE-related cleanup. (#3179) · 4c7e509f
      * Removing pragma for GCC -Wattributes, fixing forward declarations.
      
      * Introducing PYBIND11_NOINLINE_FWD to deal with CUDA, GCC7, GCC8.
      
      * Updating PYBIND11_NOINLINE_DCL in Doxyfile.
      
      * Trying noinline, noinline for {CUDA, GCC7, GCC8}
      
      * Trying noinline, inline for {CUDA, GCC7, GCC8}
      
      * Adding GCC -Wattributes `pragma` in 3 header files.
      
      * Introducing PYBIND11_NOINLINE_GCC_PRAGMA_ATTRIBUTES_NEEDED, used in 9 header files.
      
      * Removing ICC pragma 2196, to see if it is still needed.
      
      * Trying noinline, noinline for ICC
      
      * Trying noinline, inline for ICC
      
      * Restoring ICC pragma 2196, introducing PYBIND11_NOINLINE_FORCED, defined for testing.
      
      * Removing code accidentally left in (was for experimentation only).
      
      * Removing one-time-test define.
      
      * Removing PYBIND11_NOINLINE_FWD macro (after learning that it makes no sense).
      
      * Testing with PYBIND11_NOINLINE_DISABLED. Minor non-functional enhancements.
      
      * Removing #define PYBIND11_NOINLINE_DISABLED (test was successful).
      
      * Removing PYBIND11_NOINLINE_FORCED and enhancing comments for PYBIND11_NOINLINE.
      
      * WIP stripping back
      
      * Making -Wattributes pragma in pybind11 specific to GCC7, GCC8, CUDA.
      Ralf W. Grosse-Kunstleve committed
    • maint(perf): Optimize Numpy constructor to remove copies by value. (#3183) · ff590c12
      * maint(perf): Optimize Numpy Constructor with additional std::move
      
      * Add more moves
      Aaron Gokaslan committed
  10. 07 Aug, 2021 1 commit
  11. 06 Aug, 2021 5 commits
    • test_eval: Show example of working closure (#2743) · 6ac8efe5
      * test_eval: Show example of working closure
      
      * Extend test_eval_closure with weirder examples of closures for py::eval
      
      Co-authored-by: Yannick Jadoul <yannick.jadoul@belgacom.net>
      Co-authored-by: Aaron Gokaslan <skylion.aaron@gmail.com>
      Eric Cousineau committed
    • Removing GCC -Wunused-but-set-parameter from pragma block at the top of pybind11.h (#3164) · af700733
      * Cleanup triggered by work on pragma for GCC -Wunused-but-set-parameter.
      
      * Backing out changes to eigen.h (to be worked on later).
      
      * Adding PYBIND11_WORKAROUND_INCORRECT_GCC_UNUSED_BUT_SET_PARAMETER in type_caster_base.h (apparently needed only for older GCCs).
      
      * Apparently older compilers need a simpler overload for silence_unused_warnings().
      
      * clang C++11 compatibility: removing constexpr
      
      * Special case for MSVC 2017: `constexpr void` return
      
      * Trying again without the silence_unused_warnings(const int *) overload.
      
      * Separate macros for ALL_GCC, OLD_GCC_UNUSED_BUT_SET_PARAMETER
      
      * Changing to __GNUC__ <= 2 (turning off)
      
      * Refined condition for PYBIND11_WORKAROUND_INCORRECT_OLD_GCC_UNUSED_BUT_SET_PARAMETER.
      
      * Quick experiment trying out suggestion by @henryiii
      
      * Introducing macro: PYBIND11_INT_ARRAY_WORKING_AROUND_MSVC_CLANG_ISSUES
      
      * Trying henryiii@ (void) expander idea.
      
      * fix: apply simpler expression with fewer workarounds
      
      * Purging new-but-already-obsoleted  macro, made possible by @henryiii's commit.
      
      * Renaming `ALL_GCC` macro back to just `GCC` (because there is no `OLD` anymore, luckily).
      
      * [actions skip] Adding "All GCC versions" to comment, to be clear about it.
      
      Co-authored-by: Henry Schreiner <henryschreineriii@gmail.com>
      Ralf W. Grosse-Kunstleve committed
    • maint(clang-tidy): Bugprone enable checks (#3166) · 3893f37b
      * Enable bugprone checks
      
      * Reset delta and massage config
      
      * Start to apply bugprone fixes
      
      * try to fix minor bug
      
      * Fix later
      
      * Fix perfect forwarding bugprone
      
      * Remove nolint
      
      * undo constructor delete
      
      * Fix bugprone-perfect-forwarding again
      
      * Remove TODO
      
      * Add another nolint for bugprone-exception-escape in scoped interpreter
      
      * Fix remaining bugprone errors
      
      * Properly apply bugprone-macro-parantheses
      
      * Redo formatting and remove bugprone nolint
      
      * Add coment and revert more whitespace changes
      
      * Fix typo
      
      * Fix parsing bug
      
      * Add back comma
      
      * Fix clang-tidy issue
      
      * Apply remaining clang-tidy fixes
      Aaron Gokaslan committed
  12. 03 Aug, 2021 7 commits
  13. 30 Jul, 2021 4 commits
  14. 29 Jul, 2021 3 commits
  15. 28 Jul, 2021 1 commit