1. 11 Apr, 2022 4 commits
  2. 05 Apr, 2022 1 commit
    • perf: Add more moves and optimize (#3845) · c4e29528
      * Make slice constructor consistent
      
      * Add more missing std::move for ref steals
      
      * Add missing perfect forwarding for arg_v ctor
      
      * Add missing move in arg_v constructor
      
      * Revert "Add missing move in arg_v constructor"
      
      This reverts commit 126fc7c524ea7a51b54720defd75de3470d69557.
      
      * Add another missing move in cast.h
      
      * Optimize object move ctor
      
      * Don't do useless move
      
      * Make move ctor same as nb
      
      * Make obj move ctor same as nb
      
      * Revert changes which break MSVC
      Aaron Gokaslan committed
  3. 04 Apr, 2022 1 commit
  4. 01 Apr, 2022 1 commit
  5. 31 Mar, 2022 1 commit
  6. 28 Mar, 2022 1 commit
  7. 25 Mar, 2022 4 commits
  8. 24 Mar, 2022 1 commit
  9. 22 Mar, 2022 2 commits
  10. 18 Mar, 2022 1 commit
  11. 17 Mar, 2022 2 commits
  12. 15 Mar, 2022 1 commit
  13. 11 Mar, 2022 1 commit
    • PYBIND11_OBJECT_CVT should use namespace for error_already_set() (#3797) · 91a6e129
      * PYBIND11_OBJECT_CVT should use namespace for error_already_set()
      
      This change makes the macro usable outside of pybind11 namespace.
      
      * added test for use of PYBIND11_OBJECT_CVT for classes in external to pybind11 namespaces
      
      * Extended test_pytypes.cpp and test_pytest.py
      
      The added test defines a dummy function that takes a custom-defined class external::float_
      that uses PYBIND11_OBJECT_CVT
      
      * [pre-commit.ci] auto fixes from pre-commit.com hooks
      
      for more information, see https://pre-commit.ci
      
      * fixed issues pointed out by CI
      
      * [pre-commit.ci] auto fixes from pre-commit.com hooks
      
      for more information, see https://pre-commit.ci
      
      * fixed memory leak in default constructor
      
      Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
      Oleksandr Pavlyk committed
  14. 10 Mar, 2022 1 commit
  15. 02 Mar, 2022 3 commits
  16. 01 Mar, 2022 3 commits
  17. 25 Feb, 2022 1 commit
  18. 23 Feb, 2022 2 commits
  19. 20 Feb, 2022 1 commit
  20. 18 Feb, 2022 1 commit
    • Fix exception handling when pybind11::weakref() fails. (#3739) · 44596bc4
      * Clear Python error state if pybind11::weakref() fails.
      
      The weakref() constructor calls pybind11_fail() without clearing any
      Python interpreter error state. If a client catches the C++ exception
      thrown by pybind11_fail(), the Python interpreter will be left in an
      error state.
      
      * Add test case for failing to create weakref
      
      * Add Debug asserts for pybind11 fail
      
      * Make error handling more pythonic
      
      * Does this fix PyPy?
      
      * Adapt test to PyPy differences
      
      * Simplify test to remove redundancy
      
      Co-authored-by: Aaron Gokaslan <skylion.aaron@gmail.com>
      Peter Hawkins committed
  21. 16 Feb, 2022 1 commit
    • MSVC C++20 test_eigen (#3741) · 009ffc33
      * Removing C++20 condition for MSVC is_template_base_of decltype workaround.
      
      * `-DDOWNLOAD_EIGEN=ON` for MSVC 2022 C++20
      
      * `-DDOWNLOAD_EIGEN=ON` for MSVC 2019 C++20
      
      * `-DPYBIND11_WERROR=OFF` for MSVC C++20 (2019, 2020)
      
      * Restoring `defined(PYBIND11_CPP20)` in common.h
      
      * pragma warning(disable : 5054) in eigen.h
      
      * Reverting `-DPYBIND11_WERROR=OFF` changes.
      Ralf W. Grosse-Kunstleve committed
  22. 15 Feb, 2022 4 commits
  23. 14 Feb, 2022 2 commits
    • Dropping MSVC 2015 (#3722) · a97e9d8c
      * Changing `_MSC_VER` guard to `< 1910` (dropping MSVC 2015).
      
      * Removing MSVC 2015 from ci.yml, and .appveyor.yml entirely.
      
      * Bringing back .appveyor.yml from master.
      
      * appveyor Visual Studio 2017
      
      * 1st manual pass, builds & tests with unix_clang, before pre-commit.
      
      * After clang-format (via pre-commit).
      
      * Manual pass looking for "2015", builds & tests with unix_clang, before pre-commit.
      
      * Backtracking for include/pybind11 changes in previous commit.
      
      git checkout d07865846c7d31dd61111e6df801864327b65070 include/pybind11/attr.h include/pybind11/detail/common.h include/pybind11/functional.h
      
      --------------------
      
      CI #4160 errors observed:
      
      https://github.com/pybind/pybind11/pull/3722/commits/2a26873727214c5f1e159cba98f5c625b908381a
      https://github.com/pybind/pybind11/runs/5168332130?check_suite_focus=true
      
      $ grep ' error C' *.txt | sed 's/2022-02-12[^ ]*//' | sed 's/^[0-9][0-9]*//' | sed 's/^.*\.txt: //' | sort | uniqD:\a\pybind11\pybind11\include\pybind11\cast.h(1364,1): error C2752: 'pybind11::detail::type_caster<Eigen::Ref<Eigen::Vector3f,0,pybind11::EigenDStride>,void>': more than one partial specialization matches the template argument list [D:\a\pybind11\pybind11\build\tests\pybind11_tests.vcxproj]
      
      d:\a\pybind11\pybind11\include\pybind11\detail/common.h(1023): error C2737: 'pybind11::overload_cast': 'constexpr' object must be initialized [D:\a\pybind11\pybind11\build\tests\cross_module_gil_utils.vcxproj]
      d:\a\pybind11\pybind11\include\pybind11\detail/common.h(1023): error C2737: 'pybind11::overload_cast': 'constexpr' object must be initialized [D:\a\pybind11\pybind11\build\tests\pybind11_cross_module_tests.vcxproj]
      d:\a\pybind11\pybind11\include\pybind11\detail/common.h(1023): error C2737: 'pybind11::overload_cast': 'constexpr' object must be initialized [D:\a\pybind11\pybind11\build\tests\pybind11_tests.vcxproj]
      d:\a\pybind11\pybind11\include\pybind11\detail/common.h(1023): error C2737: 'pybind11::overload_cast': 'constexpr' object must be initialized [D:\a\pybind11\pybind11\build\tests\test_embed\external_module.vcxproj]
      D:\a\pybind11\pybind11\include\pybind11\detail/common.h(624): fatal error C1001: Internal compiler error. [D:\a\pybind11\pybind11\build\tests\pybind11_tests.vcxproj]
      D:\a\pybind11\pybind11\include\pybind11\detail/common.h(624): fatal error C1001: Internal compiler error. [D:\a\pybind11\pybind11\tests\pybind11_tests.vcxproj]
      
      $ grep ': error C2737' *.txt | sed 's/^.*MSVC//' | sed 's/___.*//' | sort | uniq
      
      _2017
      
      $ grep ': error C2752' *.txt
      
      3______3.8_____MSVC_2019_____x86_-DCMAKE_CXX_STANDARD=17.txt:2022-02-12T16:12:45.9921122Z D:\a\pybind11\pybind11\include\pybind11\cast.h(1364,1): error C2752: 'pybind11::detail::type_caster<Eigen::Ref<Eigen::Vector3f,0,pybind11::EigenDStride>,void>': more than one partial specialization matches the template argument list [D:\a\pybind11\pybind11\build\tests\pybind11_tests.vcxproj]
      
      $ grep ': fatal error C1001:' *.txt
      
      10______pypy-3.8-v7.3.7_____windows-2022_____x64.txt:2022-02-12T16:12:56.3163683Z D:\a\pybind11\pybind11\include\pybind11\detail/common.h(624): fatal error C1001: Internal compiler error. [D:\a\pybind11\pybind11\tests\pybind11_tests.vcxproj]
      1______3.6_____MSVC_2019_____x86.txt:2022-02-12T16:12:47.6774625Z D:\a\pybind11\pybind11\include\pybind11\detail/common.h(624): fatal error C1001: Internal compiler error. [D:\a\pybind11\pybind11\build\tests\pybind11_tests.vcxproj]
      16______3.6_____windows-latest_____x64_-DPYBIND11_FINDPYTHON=ON.txt:2022-02-12T16:12:27.0556151Z D:\a\pybind11\pybind11\include\pybind11\detail/common.h(624): fatal error C1001: Internal compiler error. [D:\a\pybind11\pybind11\tests\pybind11_tests.vcxproj]
      17______3.9_____windows-2019_____x64.txt:2022-02-12T16:12:30.3822566Z D:\a\pybind11\pybind11\include\pybind11\detail/common.h(624): fatal error C1001: Internal compiler error. [D:\a\pybind11\pybind11\tests\pybind11_tests.vcxproj]
      2______3.7_____MSVC_2019_____x86.txt:2022-02-12T16:12:38.7018911Z D:\a\pybind11\pybind11\include\pybind11\detail/common.h(624): fatal error C1001: Internal compiler error. [D:\a\pybind11\pybind11\build\tests\pybind11_tests.vcxproj]
      6______3.6_____windows-2022_____x64.txt:2022-02-12T16:12:00.4513642Z D:\a\pybind11\pybind11\include\pybind11\detail/common.h(624): fatal error C1001: Internal compiler error. [D:\a\pybind11\pybind11\tests\pybind11_tests.vcxproj]
      7______3.9_____windows-2022_____x64.txt:2022-02-12T16:11:43.6306160Z D:\a\pybind11\pybind11\include\pybind11\detail/common.h(624): fatal error C1001: Internal compiler error. [D:\a\pybind11\pybind11\tests\pybind11_tests.vcxproj]
      8______3.10_____windows-2022_____x64.txt:2022-02-12T16:11:49.9589644Z D:\a\pybind11\pybind11\include\pybind11\detail/common.h(624): fatal error C1001: Internal compiler error. [D:\a\pybind11\pybind11\tests\pybind11_tests.vcxproj]
      9______pypy-3.7-v7.3.7_____windows-2022_____x64.txt:2022-02-12T16:11:53.7912112Z D:\a\pybind11\pybind11\include\pybind11\detail/common.h(624): fatal error C1001: Internal compiler error. [D:\a\pybind11\pybind11\tests\pybind11_tests.vcxproj]
      
      * common.h: is_template_base_of
      
      * Re-applying 4 changes from 2a26873727214c5f1e159cba98f5c625b908381a that work universally.
      
      * `overload_cast = {};` only for MSVC 2017 and Clang 5
      
      * Refining condition for using is_template_base_of workaround.
      
      * Undoing MSVC 2015 workaround in test_constants_and_functions.cpp
      
      * CentOS7: silence_unused_warnings
      
      * Tweaks in response to reviews.
      
      * Adding windows-2022 C++20
      
      * Trying another way of adding windows-2022 C++20
      Ralf W. Grosse-Kunstleve committed
    • Adding MSVC 2022 C++20 GitHub Action (#3732) · 44156477
      * Trying another way of adding windows-2022 C++20
      
      * ci: try merging 2019 & 2022
      
      * Revert "ci: try merging 2019 & 2022"
      
      This reverts commit b158a1b79f69a43478dce5b89702858ad5952386.
      
      Co-authored-by: Henry Schreiner <henryschreineriii@gmail.com>
      Ralf W. Grosse-Kunstleve committed