@@ -14,60 +14,185 @@ IN DEVELOPMENT
1414
1515Removed support for Python 2.7, Python 3.5, and MSVC 2015. Support for MSVC
16162017 is limited due to availability of CI runners; we highly recommend MSVC
17- 2019 or 2022 be used.
17+ 2019 or 2022 be used. Initial support added for Python 3.11.
18+
1819
1920New features:
2021
22+ * ``py::anyset `` & ``py::frozenset `` were added, with copying (cast) to
23+ ``std::set `` (similar to ``set ``).
24+ `#3901 <https://github.com/pybind/pybind11/pull/3901 >`_
25+
26+ * Support bytearray casting to string.
27+ `#3707 <https://github.com/pybind/pybind11/pull/3707 >`_
28+
2129* ``type_caster<std::monostate> `` was added. ``std::monostate `` is a tag type
2230 that allows ``std::variant `` to act as an optional, or allows default
2331 construction of a ``std::variant `` holding a non-default constructible type.
2432 `#3818 <https://github.com/pybind/pybind11/pull/3818 >`_
2533
26- * Support bytearray casting to string.
27- `#3707 <https://github.com/pybind/pybind11/pull/3707 >`_
34+ * ``pybind11::capsule::set_name `` added to mutate the name of the capsule instance.
35+ `#3866 <https://github.com/pybind/pybind11/pull/3866 >`_
36+
37+ * NumPy: dtype constructor from type number added, accessors corresponding to
38+ Python API ``dtype.num ``, ``dtype.byteorder ``, ``dtype.flags `` and
39+ ``dtype.alignment `` added.
40+ `#3868 <https://github.com/pybind/pybind11/pull/3868 >`_
41+
2842
2943Changes:
3044
31- * Python 2 support was removed completely .
45+ * Python 3.6 is now the minimum supported version .
3246 `#3688 <https://github.com/pybind/pybind11/pull/3688 >`_
47+ `#3719 <https://github.com/pybind/pybind11/pull/3719 >`_
3348
3449* The minimum version for MSVC is now 2017.
3550 `#3722 <https://github.com/pybind/pybind11/pull/3722 >`_
3651
52+ * Fix issues with CPython 3.11 betas and add to supported test matrix.
53+ `#3923 <https://github.com/pybind/pybind11/pull/3923 >`_
54+
55+ * ``error_already_set `` is now safer and more performant, especially for
56+ exceptions with long tracebacks, by delaying computation.
57+ `#1895 <https://github.com/pybind/pybind11/pull/1895 >`_
58+
3759* Improve exception handling in python ``str `` bindings.
3860 `#3826 <https://github.com/pybind/pybind11/pull/3826 >`_
3961
4062* The bindings for capsules now have more consistent exception handling.
4163 `#3825 <https://github.com/pybind/pybind11/pull/3825 >`_
4264
65+ * ``PYBIND11_OBJECT_CVT `` and ``PYBIND11_OBJECT_CVT_DEFAULT `` macro can now be
66+ used to define classes in namespaces other than pybind11.
67+ `#3797 <https://github.com/pybind/pybind11/pull/3797 >`_
68+
69+ * Error printing code now uses ``PYBIND11_DETAILED_ERROR_MESSAGES `` instead of
70+ requiring ``NDEBUG ``, allowing use with release builds if desired.
71+ `#3913 <https://github.com/pybind/pybind11/pull/3913 >`_
72+
73+
74+ Bug fixes:
75+
4376* Fix exception handling when ``pybind11::weakref() `` fails.
4477 `#3739 <https://github.com/pybind/pybind11/pull/3739 >`_
4578
79+ * ``module_::def_submodule `` was missing proper error handling. This is fixed now.
80+ `#3973 <https://github.com/pybind/pybind11/pull/3973 >`_
4681
47- Bug fixes:
82+ * The behavior or ``error_already_set `` was made safer and the highly opaque
83+ "Unknown internal error occurred" message was replaced with a more helpful
84+ message.
85+ `#3982 <https://github.com/pybind/pybind11/pull/3982 >`_
86+
87+ * ``error_already_set::what() `` now handles non-normalized exceptions correctly.
88+ `#3971 <https://github.com/pybind/pybind11/pull/3971 >`_
89+
90+ * Support older C++ compilers where filesystem is not yet part of the standard
91+ library and is instead included in ``std::experimental::filesystem ``.
92+ `#3840 <https://github.com/pybind/pybind11/pull/3840 >`_
93+
94+ * Fix ``-Wfree-nonheap-object `` warnings produced by GCC by avoiding returning
95+ pointers to static objects with ``return_value_policy::take_ownership ``.
96+ `#3946 <https://github.com/pybind/pybind11/pull/3946 >`_
97+
98+ * Fix cast from pytype rvalue to another pytype.
99+ `#3949 <https://github.com/pybind/pybind11/pull/3949 >`_
100+
101+ * ``pybind11::detail::get_internals() `` is now resilient to in-flight Python
102+ exceptions.
103+ `#3981 <https://github.com/pybind/pybind11/pull/3981 >`_
104+
105+ * Arrays with a dimension of size 0 are now properly converted to dynamic Eigen
106+ matrices (more common in NumPy 1.23).
107+ `#4038 <https://github.com/pybind/pybind11/pull/4038 >`_
108+
109+ * Avoid catching unrelated errors when importing NumPy.
110+ `#3974 <https://github.com/pybind/pybind11/pull/3974 >`_
111+
112+ Performance and style:
113+
114+ * Added an accessor overload of ``(object &&key) `` to reference steal the
115+ object when using python types as keys. This prevents unnecessary reference
116+ count overhead for attr, dictionary, tuple, and sequence look ups. Added
117+ additional regression tests. Fixed a performance bug the caused accessor
118+ assignments to potentially perform unnecessary copies.
119+ `#3970 <https://github.com/pybind/pybind11/pull/3970 >`_
120+
121+ * Perfect forward all args of ``make_iterator ``.
122+ `#3980 <https://github.com/pybind/pybind11/pull/3980 >`_
123+
124+ * Avoid potential bug in pycapsule destructor by adding an ``error_guard `` to
125+ one of the dtors.
126+ `#3958 <https://github.com/pybind/pybind11/pull/3958 >`_
127+
128+ * Optimize dictionary access in ``strip_padding `` for numpy.
129+ `#3994 <https://github.com/pybind/pybind11/pull/3994 >`_
130+
131+ * ``stl_bind.h `` bindings now take slice args as a const-ref.
132+ `#3852 <https://github.com/pybind/pybind11/pull/3852 >`_
133+
134+ * Made slice constructor more consistent, and improve performance of some
135+ casters by allowing reference stealing.
136+ `#3845 <https://github.com/pybind/pybind11/pull/3845 >`_
137+
138+ * Change numpy dtype from_args method to use const ref.
139+ `#3878 <https://github.com/pybind/pybind11/pull/3878 >`_
140+
141+ * Follow rule of three to ensure ``PyErr_Restore `` is called only once.
142+ `#3872 <https://github.com/pybind/pybind11/pull/3872 >`_
143+
144+ * Added missing perfect forwarding for ``make_iterator `` functions.
145+ `#3860 <https://github.com/pybind/pybind11/pull/3860 >`_
146+
147+ * Optimize c++ to python function casting by using the rvalue caster.
148+ `#3966 <https://github.com/pybind/pybind11/pull/3966 >`_
149+
150+ * Avoid potential implicit copy/assignment constructors causing double free in
151+ ``strdup_gaurd ``.
152+ `#3905 <https://github.com/pybind/pybind11/pull/3905 >`_
153+
154+ * Enable clang-tidy checks ``misc-definitions-in-headers ``,
155+ ``modernize-loop-convert ``, and ``modernize-use-nullptr ``.
156+ `#3881 <https://github.com/pybind/pybind11/pull/3881 >`_
157+ `#3988 <https://github.com/pybind/pybind11/pull/3988 >`_
48158
49- * ``PYBIND11_OBJECT_CVT `` and ``PYBIND11_OBJECT_CVT_DEFAULT `` macro can be used
50- to define classes in namespaces other than pybind11.
51- `#3797 <https://github.com/pybind/pybind11/pull/3797 >`_
52159
53160Build system improvements:
54161
162+ * CMake: Fix file extension on Windows with cp36 and cp37 using FindPython.
163+ `#3919 <https://github.com/pybind/pybind11/pull/3919 >`_
164+
165+ * CMake: Support multiple Python targets (such as on vcpkg).
166+ `#3948 <https://github.com/pybind/pybind11/pull/3948 >`_
167+
168+ * CMake: Fix issue with NVCC on Windows.
169+ `#3947 <https://github.com/pybind/pybind11/pull/3947 >`_
170+
171+ * CMake: Drop the bitness check on cross compiles (like targeting WebAssembly
172+ via Emscripten).
173+ `#3959 <https://github.com/pybind/pybind11/pull/3959 >`_
174+
55175* Add MSVC builds in debug mode to CI.
56176 `#3784 <https://github.com/pybind/pybind11/pull/3784 >`_
57177
58178* MSVC 2022 C++20 coverage was added to GitHub Actions, including Eigen.
59179 `#3732 <https://github.com/pybind/pybind11/pull/3732 >`_,
60180 `#3741 <https://github.com/pybind/pybind11/pull/3741 >`_
61181
62- * Avoid ``setup.py <command> `` usage in internal tests.
63- `#3734 <https://github.com/pybind/pybind11/pull/3734 >`_
64-
65182
66183Backend and tidying up:
67184
68- * Remove idioms in code comments. Use inclusive language.
185+ * Remove idioms in code comments. Use more inclusive language.
69186 `#3809 <https://github.com/pybind/pybind11/pull/3809 >`_
70187
188+ * ``#include <iostream> `` was removed from the ``pybind11/stl.h `` header. Your
189+ project may break if it has a transitive dependency on this include. The fix
190+ is to "Include What You Use".
191+ `#3928 <https://github.com/pybind/pybind11/pull/3928 >`_
192+
193+ * Avoid ``setup.py <command> `` usage in internal tests.
194+ `#3734 <https://github.com/pybind/pybind11/pull/3734 >`_
195+
71196
72197Version 2.9.2 (Mar 29, 2022)
73198----------------------------
0 commit comments