@@ -9,13 +9,127 @@ Starting with version 1.8.0, pybind11 releases use a `semantic versioning
99v2.8.0 (WIP)
1010------------
1111
12+ New features:
13+
14+ * Added ``py::raise_from `` to enable chaining exceptions.
15+ `#3215 <https://github.com/pybind/pybind11/pull/3215 >`_
16+
1217* Allow exception translators to be optionally registered local to a module
1318 instead of applying globally across all pybind11 modules. Use
1419 ``register_local_exception_translator(ExceptionTranslator&& translator) ``
1520 instead of ``register_exception_translator(ExceptionTranslator&&
1621 translator) `` to keep your exception remapping code local to the module.
1722 `#2650 <https://github.com/pybind/pybind11/pull/2650 >`_
1823
24+ * Add ``make_simple_namespace `` function for instantiating Python
25+ ``SimpleNamespace `` objects.
26+ `#2840 <https://github.com/pybind/pybind11/pull/2840 >`_
27+
28+ * ``pybind11::scoped_interpreter `` and ``initialize_interpreter `` have new
29+ arguments to allow ``sys.argv `` initialization.
30+ `#2341 <https://github.com/pybind/pybind11/pull/2341 >`_
31+
32+ * Allow Python builtins to be used as callbacks in CPython.
33+ `#1413 <https://github.com/pybind/pybind11/pull/1413 >`_
34+
35+ * Added ``view `` to view arrays with a different datatype.
36+ `#987 <https://github.com/pybind/pybind11/pull/987 >`_
37+
38+ * Implemented ``reshape `` on arrays.
39+ `#984 <https://github.com/pybind/pybind11/pull/984 >`_
40+
41+
42+ Changes:
43+
44+ * Set ``__file__ `` constant when running ``eval_file `` in an embedded interpreter.
45+ `#3233 <https://github.com/pybind/pybind11/pull/3233 >`_
46+
47+ * The pybind11 proxy types ``str ``, ``bytes ``, ``bytearray ``, ``tuple ``,
48+ ``list `` now consistently support passing ``ssize_t `` values for sizes and
49+ indexes. Previously, only ``size_t `` was accepted in several interfaces.
50+ `#3219 <https://github.com/pybind/pybind11/pull/3219 >`_
51+
52+
53+ Fixes:
54+
55+ * Bug fix: enum value's ``__int__ `` returning non-int when underlying type is bool or of char type.
56+ `#1334 <https://github.com/pybind/pybind11/pull/1334 >`_
57+
58+ * Fixes bug in setting error state in Capsule's pointer methods.
59+ `#3261 <https://github.com/pybind/pybind11/pull/3261 >`_
60+
61+ * A long-standing memory leak in ``py::cpp_function::initialize `` was fixed.
62+ `#3229 <https://github.com/pybind/pybind11/pull/3229 >`_
63+
64+ * Fixes thread safety for some ``pybind11::type_caster `` which require lifetime extension, such as for ``std::string_view ``.
65+ `#3237 <https://github.com/pybind/pybind11/pull/3237 >`_
66+
67+ * Restore compatibility with gcc 4.8.4 as distributed by ubuntu-trusty, linuxmint-17.
68+ `#3270 <https://github.com/pybind/pybind11/pull/3270 >`_
69+
70+
71+ Build system improvements:
72+
73+ * Fix regression in CMake Python package config: improper use of absolute path.
74+ `#3144 <https://github.com/pybind/pybind11/pull/3144 >`_
75+
76+ * Specified UTF8-encoding in setup.py calls of open().
77+ `#3137 <https://github.com/pybind/pybind11/pull/3137 >`_
78+
79+
80+ Backend and tidying up:
81+
82+ * Optimize NumPy array construction with additional moves.
83+ `#3183 <https://github.com/pybind/pybind11/pull/3183 >`_
84+
85+ * Conversion to ``std::string `` and ``std::string_view `` now avoids making an
86+ extra copy of the data on Python >= 3.3.
87+ `#3257 <https://github.com/pybind/pybind11/pull/3257 >`_
88+
89+ * Remove const modifier from certain C++ methods on Python collections
90+ (``list ``, ``set ``, ``dict ``) such as (``clear() ``, ``append() ``,
91+ ``insert() ``, etc...) and annotated them with ``py-non-const ``.
92+
93+ * Enable readability ``clang-tidy-const-return `` and remove useless consts.
94+ `#3254 <https://github.com/pybind/pybind11/pull/3254 >`_
95+ `#3194 <https://github.com/pybind/pybind11/pull/3194 >`_
96+
97+ * The clang-tidy ``google-explicit-constructor `` option was enabled.
98+ `#3250 <https://github.com/pybind/pybind11/pull/3250 >`_
99+
100+ * Mark a pytype move constructor as noexcept (perf).
101+ `#3236 <https://github.com/pybind/pybind11/pull/3236 >`_
102+
103+ * Enable clang-tidy check to guard against inheritance slicing.
104+ `#3210 <https://github.com/pybind/pybind11/pull/3210 >`_
105+
106+ * Legacy warning suppression pragma were removed from eigen.h. On Unix
107+ platforms, please use -isystem for Eigen include directories, to suppress
108+ compiler warnings originating from Eigen headers. Note that CMake does this
109+ by default. No adjustments are needed for Windows.
110+ `#3198 <https://github.com/pybind/pybind11/pull/3198 >`_
111+
112+ * Format pybind11 with isort consistent ordering of imports
113+ `#3195 <https://github.com/pybind/pybind11/pull/3195 >`_
114+
115+ * The warnings-suppression "pragma clamp" at the top/bottom of pybind11 was
116+ removed, clearing the path to refactoring and IWYU cleanup.
117+ `#3186 <https://github.com/pybind/pybind11/pull/3186 >`_
118+
119+ * Enable most bugprone checks in clang-tidy and fix the found potential bugs
120+ and poor coding styles.
121+ `#3166 <https://github.com/pybind/pybind11/pull/3166 >`_
122+
123+ * Add ``clang-tidy-readability `` rules to make boolean casts explicit improving
124+ code readability. Also enabled other misc and readability clang-tidy checks.
125+ `#3148 <https://github.com/pybind/pybind11/pull/3148 >`_
126+
127+ * Move object in ``.pop() `` for list.
128+ `#3116 <https://github.com/pybind/pybind11/pull/3116 >`_
129+
130+
131+
132+
19133v2.7.1 (Aug 3, 2021)
20134---------------------
21135
0 commit comments