github pybind/pybind11 v2.9.1
Version 2.9.1

latest releases: v2.12.0, v2.11.1, v2.11.0...
2 years ago

Changes:

  • If possible, attach Python exception with py::raise_from to TypeError when casting from C++ to Python. This will give additional info if Python exceptions occur in the caster. Adds a test case of trying to convert a set from C++ to Python when the hash function is not defined in Python. #3605
  • Add a mapping of C++11 nested exceptions to their Python exception equivalent using py::raise_from. This attaches the nested exceptions in Python using the __cause__ field. #3608
  • Propagate Python exception traceback using raise_from if a pybind11 function runs out of overloads. #3671
  • py::multiple_inheritance is now only needed when C++ bases are hidden from pybind11. #3650 and #3659

Bug fixes:

  • Remove a boolean cast in numpy.h that causes MSVC C4800 warnings when compiling against Python 3.10 or newer. #3669
  • Render py::bool_ and py::float_ as bool and float respectively. #3622

Build system improvements:

  • Fix CMake extension suffix computation on Python 3.10+. #3663
  • Allow CMAKE_ARGS to override CMake args in pybind11's own setup.py. #3577
  • Remove a few deprecated c-headers. #3610
  • More uniform handling of test targets. #3590
  • Add clang-tidy readability check to catch potentially swapped function args. #3611

Don't miss a new pybind11 release

NewReleases is sending notifications on new releases.