@@ -9,12 +9,143 @@ Starting with version 1.8.0, pybind11 releases use a `semantic versioning
9
9
v2.7.0 (TBA, not yet released)
10
10
------------------------------
11
11
12
+ New features:
13
+
14
+ * Enable ``py::implicitly_convertible<py::none, ...> `` for
15
+ ``py::class_ ``-wrapped types.
16
+ `#3059 <https://github.com/pybind/pybind11/pull/3059 >`_
17
+
18
+ * Allow function pointer extraction from overloaded functions.
19
+ `#2944 <https://github.com/pybind/pybind11/pull/2944 >`_
20
+
21
+ * NumPy: added ``.char_() `` to type which gives the NumPy public ``char ``
22
+ result, which also distinguishes types by bit length (unlike ``.kind() ``).
23
+ `#2864 <https://github.com/pybind/pybind11/pull/2864 >`_
24
+
25
+ * Add ``pybind11::bytearray `` to manipulate ``bytearray `` similar to ``bytes ``.
26
+ `#2799 <https://github.com/pybind/pybind11/pull/2799 >`_
27
+
28
+ * ``pybind11/stl/filesystem.h `` registers a type caster that, on C++17/Python
29
+ 3.6+, converts ``std::filesystem::path `` to ``pathlib.Path `` and any
30
+ ``os.PathLike `` to ``std::filesystem::path ``.
31
+ `#2730 <https://github.com/pybind/pybind11/pull/2730 >`_
32
+
33
+
34
+ Changes:
35
+
12
36
* ``py::str `` changed to exclusively hold `PyUnicodeObject `. Previously
13
37
``py::str `` could also hold `bytes `, which is probably surprising, was
14
38
never documented, and can mask bugs (e.g. accidental use of ``py::str ``
15
39
instead of ``py::bytes ``).
16
40
`#2409 <https://github.com/pybind/pybind11/pull/2409 >`_
17
41
42
+ * Add a safety guard to ensure that the Python GIL is held when C++ calls back
43
+ into Python via ``object_api<>::operator() `` (e.g. ``py::function ``
44
+ ``__call__ ``). (This feature is available for Python 3.6+ only.)
45
+ `#2919 <https://github.com/pybind/pybind11/pull/2919 >`_
46
+
47
+ * Catch a missing ``self `` argument in calls to ``__init__() ``.
48
+ `#2914 <https://github.com/pybind/pybind11/pull/2914 >`_
49
+
50
+ * Use ``std::string_view `` if available to avoid a copy when passing an object
51
+ to a ``std::ostream ``.
52
+ `#3042 <https://github.com/pybind/pybind11/pull/3042 >`_
53
+
54
+ * An important warning about thread safety was added to the ``iostream.h ``
55
+ documentation; attempts to make ``py::scoped_ostream_redirect `` thread safe
56
+ have been removed, as it was only partially effective.
57
+ `#2995 <https://github.com/pybind/pybind11/pull/2995 >`_
58
+
59
+
60
+ Fixes:
61
+
62
+ * Performance: avoid unnecessary strlen calls.
63
+ `#3058 <https://github.com/pybind/pybind11/pull/3058 >`_
64
+
65
+ * Fix auto-generated documentation string when using ``const T `` in
66
+ ``pyarray_t ``.
67
+ `#3020 <https://github.com/pybind/pybind11/pull/3020 >`_
68
+
69
+ * Unify error messages thrown by ``simple_collector ``/``unpacking_collector ``.
70
+ `#3013 <https://github.com/pybind/pybind11/pull/3013 >`_
71
+
72
+ * ``pybind11::builtin_exception `` is now explicitly exported, which means the
73
+ types included/defined in different modules are identical, and exceptions
74
+ raised in different modules can be caught correctly. The documentation was
75
+ updated to explain that custom exceptions that are used across module
76
+ boundaries need to be explicitly exported as well.
77
+ `#2999 <https://github.com/pybind/pybind11/pull/2999 >`_
78
+
79
+ * Fixed exception when printing UTF-8 to a ``scoped_ostream_redirect ``.
80
+ `#2982 <https://github.com/pybind/pybind11/pull/2982 >`_
81
+
82
+ * Pickle support enhancement: ``setstate `` implementation will attempt to
83
+ ``setattr `` ``__dict__ `` only if the unpickled ``dict `` object is not empty,
84
+ to not force use of ``py::dynamic_attr() `` unnecessarily.
85
+ `#2972 <https://github.com/pybind/pybind11/pull/2972 >`_
86
+
87
+ * Allow negative timedelta values to roundtrip.
88
+ `#2870 <https://github.com/pybind/pybind11/pull/2870 >`_
89
+
90
+ * Fix unchecked errors could potentially swallow signals/other exceptions.
91
+ `#2863 <https://github.com/pybind/pybind11/pull/2863 >`_
92
+
93
+ * Add null pointer check with ``std::localtime ``.
94
+ `#2846 <https://github.com/pybind/pybind11/pull/2846 >`_
95
+
96
+ * Fix the ``weakref `` constructor from ``py::object `` to create a new
97
+ ``weakref `` on conversion.
98
+ `#2832 <https://github.com/pybind/pybind11/pull/2832 >`_
99
+
100
+ * Avoid relying on exceptions in C++17 when getting a ``shared_ptr `` holder
101
+ from a ``shared_from_this `` class.
102
+ `#2819 <https://github.com/pybind/pybind11/pull/2819 >`_
103
+
104
+
105
+ Build system improvements:
106
+
107
+ * In ``setup_helpers.py ``, test for platforms that have some multiprocessing
108
+ features but lack semaphores, which ``ParallelCompile `` requires.
109
+ `#3043 <https://github.com/pybind/pybind11/pull/3043 >`_
110
+
111
+ * Fix ``pybind11_INCLUDE_DIR `` in case ``CMAKE_INSTALL_INCLUDEDIR `` is
112
+ absolute.
113
+ `#3005 <https://github.com/pybind/pybind11/pull/3005 >`_
114
+
115
+ * Fix bug not respecting ``WITH_SOABI `` or ``WITHOUT_SOABI `` to CMake.
116
+ `#2938 <https://github.com/pybind/pybind11/pull/2938 >`_
117
+
118
+ * Fix the default ``Pybind11Extension `` compilation flags with a Mingw64 python.
119
+ `#2921 <https://github.com/pybind/pybind11/pull/2921 >`_
120
+
121
+ * Clang on Windows: do not pass ``/MP `` (ignored flag).
122
+ `#2824 <https://github.com/pybind/pybind11/pull/2824 >`_
123
+
124
+
125
+ Backend and tidying up:
126
+
127
+ * Enable clang-tidy performance, readability, and modernization checks
128
+ throughout the codebase to enforce best coding practices.
129
+ `#3046 <https://github.com/pybind/pybind11/pull/3046 >`_,
130
+ `#3049 <https://github.com/pybind/pybind11/pull/3049 >`_,
131
+ `#3051 <https://github.com/pybind/pybind11/pull/3051 >`_,
132
+ `#3052 <https://github.com/pybind/pybind11/pull/3052 >`_, and
133
+ `#3080 <https://github.com/pybind/pybind11/pull/3080 >`_
134
+
135
+ * Checks for common misspellings were added to the pre-commit hooks.
136
+ `#3076 <https://github.com/pybind/pybind11/pull/3076 >`_
137
+
138
+ * Changed ``Werror `` to stricter ``Werror-all `` for Intel compiler and fixed
139
+ minor issues.
140
+ `#2948 <https://github.com/pybind/pybind11/pull/2948 >`_
141
+
142
+ * Fixed compilation with GCC < 5 when the user defines ``_GLIBCXX_USE_CXX11_ABI ``.
143
+ `#2956 <https://github.com/pybind/pybind11/pull/2956 >`_
144
+
145
+ * Added nox support for easier local testing and linting of contributions.
146
+ `#3101 <https://github.com/pybind/pybind11/pull/3101 >`_
147
+
148
+
18
149
19
150
v2.6.2 (Jan 26, 2021)
20
151
---------------------
0 commit comments