v2.9.1
版本发布时间: 2022-02-03 08:29:13
pybind/pybind11最新发布版本:v2.13.6(2024-09-14 08:33:41)
Changes:
- If possible, attach Python exception with
py::raise_from
toTypeError
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_
andpy::float_
asbool
andfloat
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 ownsetup.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