1. 15 Sep, 2021 1 commit
  2. 09 Sep, 2021 1 commit
    • Ralf W. Grosse-Kunstleve's avatar
      CodeHealth: Enabling clang-tidy google-explicit-constructor (#3250) · 6abf2baa
      Ralf W. Grosse-Kunstleve authored
      * Adding google-explicit-constructor to .clang-tidy
      
      * clang-tidy explicit attr.h (all automatic)
      
      * clang-tidy explicit cast.h (all automatic)
      
      * clang-tidy detail/init.h (1 NOLINT)
      
      * clang-tidy detail/type_caster_base.h (2 NOLINT)
      
      * clang-tidy pybind11.h (7 NOLINT)
      
      * clang-tidy detail/common.h (3 NOLINT)
      
      * clang-tidy detail/descr.h (2 NOLINT)
      
      * clang-tidy pytypes.h (23 NOLINT, only 1 explicit)
      
      * clang-tidy eigen.h (7 NOLINT, 0 explicit)
      
      * Adding 2 explicit in functional.h
      
      * Adding 4 explicit in iostream.h
      
      * clang-tidy numpy.h (1 NOLINT, 1 explicit)
      
      * clang-tidy embed.h (0 NOLINT, 1 explicit)
      
      * clang-tidy tests/local_bindings.h (0 NOLINT, 4 explicit)
      
      * clang-tidy tests/pybind11_cross_module_tests.cpp (0 NOLINT, 1 explicit)
      
      * clang-tidy tests/pybind11_tests.h (0 NOLINT, 2 explicit)
      
      * clang-tidy tests/test_buffers.cpp (0 NOLINT, 2 explicit)
      
      * clang-tidy tests/test_builtin_casters.cpp (0 NOLINT, 4 explicit)
      
      * clang-tidy tests/test_class.cpp (0 NOLINT, 6 explicit)
      
      * clang-tidy tests/test_copy_move.cpp (0 NOLINT, 7 explicit)
      
      * clang-tidy tests/test_embed/external_module.cpp (0 NOLINT, 1 explicit)
      
      * clang-tidy tests/test_embed/test_interpreter.cpp (0 NOLINT, 1 explicit)
      
      * clang-tidy tests/object.h (0 NOLINT, 2 explicit)
      
      * clang-tidy batch of fully automatic fixes.
      
      * Workaround for MSVC 19.16.27045.0 C++17 Python 2 C++ syntax error.
      6abf2baa
  3. 26 Aug, 2021 2 commits
  4. 19 Aug, 2021 1 commit
    • Ralf W. Grosse-Kunstleve's avatar
      Cleanup of file-scoped and globally-scoped warning suppression pragmas across... · 998d45e4
      Ralf W. Grosse-Kunstleve authored
      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.
      998d45e4
  5. 09 Aug, 2021 2 commits
    • Ralf W. Grosse-Kunstleve's avatar
      PYBIND11_NOINLINE-related cleanup. (#3179) · 4c7e509f
      Ralf W. Grosse-Kunstleve authored
      * 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.
      4c7e509f
    • Aaron Gokaslan's avatar
      maint(perf): Optimize Numpy constructor to remove copies by value. (#3183) · ff590c12
      Aaron Gokaslan authored
      * maint(perf): Optimize Numpy Constructor with additional std::move
      
      * Add more moves
      ff590c12
  6. 06 Aug, 2021 1 commit
    • Aaron Gokaslan's avatar
      maint(clang-tidy): Bugprone enable checks (#3166) · 3893f37b
      Aaron Gokaslan authored
      * 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
      3893f37b
  7. 27 Jul, 2021 1 commit
  8. 09 Jul, 2021 1 commit
  9. 21 Jun, 2021 1 commit
  10. 19 Jun, 2021 1 commit
  11. 08 Jun, 2021 1 commit
    • Jack S. Hale's avatar
      Add const T to docstring generation. (#3020) · 4c7697db
      Jack S. Hale authored
      
      
      * 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: default avatarRalf W. Grosse-Kunstleve <rwgk@google.com>
      4c7697db
  12. 19 Apr, 2021 1 commit
    • mvoelkle-cern's avatar
      Fix compilation with gcc < 5 (#2956) · e08a5811
      mvoelkle-cern authored
      When the user defines _GLIBCXX_USE_CXX11_ABI=0 to force the pre-c++11 ABI, numpy.h assumes that is_trivially_copyable is available.
      It is not necessarily the case. This patch uses clang's feature detection instead.
      The workaround is for certain libstdc++ versions, so the test should target these particular versions.
      e08a5811
  13. 23 Feb, 2021 1 commit
    • Bertrand MICHEL's avatar
      Dtype kind vs char (#2864) · 74a767d4
      Bertrand MICHEL authored
      
      
      * [dtype]: add type() method to access type attribute of PyArray_Descr (eq. to dtype.char in Python)
      
      * [dtype] change type() name method to char_() to be compliant with Python numpy interface
      
      * [dtype] fix by pre-commit
      
      * [dtype] Change comments and solutions format for test
      
      * Clarify documentation and move note about dtype.char vs PyArray_Descr::type to a plain, non-doxygen comment
      
      * Fix and extend tests
      
      * Fix the supposedly fixed tests
      
      * Fix the fixed tests again
      Co-authored-by: default avatarBertrand MICHEL <bertrand.michel@onera.fr>
      Co-authored-by: default avatarYannick Jadoul <yannick.jadoul@belgacom.net>
      74a767d4
  14. 09 Nov, 2020 1 commit
  15. 15 Oct, 2020 2 commits
  16. 03 Oct, 2020 2 commits
    • Fritz Reese's avatar
      Fix buffer_info for ctypes buffers (pybind#2502) (#2503) · e8ad33bb
      Fritz Reese authored
      * tests: New test for ctypes buffers (pybind#2502)
      
      * fix: fix buffer_info segfault on views with no stride (pybind11#2502)
      
      * Explicit conversions in buffer_info to make clang happy (pybind#2502)
      
      * Another explicit cast in buffer_info constructor for clang (pybind#2502)
      
      * Simpler implementation of buffer_info constructor from Py_buffer.
      
      * Move test_ctypes_buffer into test_buffers
      
      * Comment on why view->strides may be NULL (and fix some whitespace)
      
      * Use c_strides() instead of zero when view->strides is NULL.
      
      c_strides and f_strides are moved from numpy.h (py::array)
      to buffer_info.h (py::detail) so they can be used from the
      buffer_info Py_buffer constructor.
      
      * Increase ctypes buffer test coverage in test_buffers.
      
      * Split ctypes tests and skip one which is broken in PyPy2.
      e8ad33bb
    • Henry Schreiner's avatar
      refactor: module -> module_ with typedef (#2544) · 6bcd220c
      Henry Schreiner authored
      * WIP: module -> module_ without typedef
      
      * refactor: allow py::module to work again
      6bcd220c
  17. 02 Oct, 2020 2 commits
  18. 16 Sep, 2020 1 commit
  19. 15 Sep, 2020 3 commits
  20. 10 Sep, 2020 1 commit
    • Henry Schreiner's avatar
      fix: support nvcc and test (#2461) · 621906b3
      Henry Schreiner authored
      * fix: support nvcc and test
      
      * fixup! fix: support nvcc and test
      
      * docs: mention what compilers fail
      
      * fix: much simpler logic
      
      * refactor: slightly faster / clearer
      621906b3
  21. 14 Aug, 2020 1 commit
  22. 26 Jul, 2020 1 commit
  23. 12 Jul, 2020 1 commit
  24. 08 Jul, 2020 1 commit
  25. 10 Jun, 2020 2 commits
  26. 26 Apr, 2020 1 commit
  27. 28 Nov, 2019 2 commits
  28. 21 Sep, 2019 1 commit
  29. 27 Jul, 2019 1 commit
  30. 23 Jul, 2019 1 commit
  31. 15 Jul, 2019 1 commit
    • Igor Socec's avatar
      Dtype field ordering for NumPy 1.14 (#1837) · a301c5ad
      Igor Socec authored
      * Test dtype field order in numpy dtype tests
      
      When running tests with NumPy 1.14 or later this test exposes the
      "invalid buffer descriptor" error reported in #1274.
      
      * Create dtype_ptr with ordered fields
      a301c5ad