v2.8.1
版本发布时间: 2021-10-28 06:03:38
pybind/pybind11最新发布版本:v2.13.6(2024-09-14 08:33:41)
v2.8.1 (Oct 27, 2021)
Changes and additions:
- The simple namespace creation shortcut added in 2.8.0 was deprecated due to usage of CPython internal API, and will be removed soon. Use
py::module_::import("types").attr("SimpleNamespace")
. #3374 - Add C++ Exception type to throw and catch
AttributeError
. Useful for defining custom__setattr__
and__getattr__
methods. #3387
Fixes:
- Fixed the potential for dangling references when using properties with
std::optional
types. #3376 - Modernize usage of
PyCodeObject
on Python 3.9+ (moving toward support for Python 3.11a1) #3368 - A long-standing bug in
eigen.h
was fixed (originally PR #3343). The bug was unmasked by newly addedstatic_assert
's in the Eigen 3.4.0 release. #3352 - Support multiple raw inclusion of CMake helper files (Conan.io does this for multi-config generators). #3420
- Fix harmless warning on upcoming CMake 3.22. #3368
- Fix 2.8.0 regression with MSVC 2017 + C++17 mode + Python 3. #3407
- Fix 2.8.0 regression that caused undefined behavior (typically segfaults) in
make_key_iterator
/make_value_iterator
if dereferencing the iterator returned a temporary value instead of a reference. #3348