Skip to content

Commit c3b204d

Browse files
committed
docs: update changelog
1 parent f0a65c8 commit c3b204d

File tree

1 file changed

+142
-0
lines changed

1 file changed

+142
-0
lines changed

docs/changelog.rst

+142
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,154 @@ Starting with version 1.8.0, pybind11 releases use a `semantic versioning
99
v2.7.0 (TBA, not yet released)
1010
------------------------------
1111

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+
1236
* ``py::str`` changed to exclusively hold `PyUnicodeObject`. Previously
1337
``py::str`` could also hold `bytes`, which is probably surprising, was
1438
never documented, and can mask bugs (e.g. accidental use of ``py::str``
1539
instead of ``py::bytes``).
1640
`#2409 <https://github.com/pybind/pybind11/pull/2409>`_
1741

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+
55+
Fixes:
56+
57+
* Performance: avoid unnecessary strlen calls.
58+
`#3058 <https://github.com/pybind/pybind11/pull/3058>`_
59+
60+
* Fix auto-generated documentation string when using ``const T`` in
61+
``pyarray_t``.
62+
`#3020 <https://github.com/pybind/pybind11/pull/3020>`_
63+
64+
* Unify error messages thrown by ``simple_collector``/``unpacking_collector``.
65+
`#3013 <https://github.com/pybind/pybind11/pull/3013>`_
66+
67+
* ``pybind11::builtin_exception`` is now explicitly exported, which means the
68+
types included/defined in different modules are identical, and exceptions
69+
raised in different modules can be caught correctly. The documentation was
70+
updated to explain that custom exceptions that are used across module
71+
boundaries need to be explicitly exported as well.
72+
`#2999 <https://github.com/pybind/pybind11/pull/2999>`_
73+
74+
* Fixed exception when printing UTF-8 to a ``scoped_ostream_redirect``.
75+
`#2982 <https://github.com/pybind/pybind11/pull/2982>`_
76+
77+
* Pickle support enhancement: ``setstate`` implementation will attempt to
78+
``setattr`` ``__dict__`` only if the unpickled ``dict`` object is not empty,
79+
to not force use of ``py::dynamic_attr()`` unnecessarily.
80+
`#2972 <https://github.com/pybind/pybind11/pull/2972>`_
81+
82+
* Allow negative timedelta values to roundtrip.
83+
`#2870 <https://github.com/pybind/pybind11/pull/2870>`_
84+
85+
* Fix unchecked errors could potentially swallow signals/other exceptions.
86+
`#2863 <https://github.com/pybind/pybind11/pull/2863>`_
87+
88+
* Add null pointer check with ``std::localtime``.
89+
`#2846 <https://github.com/pybind/pybind11/pull/2846>`_
90+
91+
* Fix the ``weakref`` constructor from ``py::object`` to create a new
92+
``weakref`` on conversion.
93+
`#2832 <https://github.com/pybind/pybind11/pull/2832>`_
94+
95+
* Avoid relying on exceptions in C++17 when getting a ``shared_ptr`` holder
96+
from a ``shared_from_this`` class.
97+
`#2819 <https://github.com/pybind/pybind11/pull/2819>`_
98+
99+
100+
Build system improvements:
101+
102+
* In ``setup_helpers.py``, test for platforms that have some multiprocessing
103+
features but lack semaphores, which ``ParallelCompile`` requires.
104+
`#3043 <https://github.com/pybind/pybind11/pull/3043>`_
105+
106+
* Fix ``pybind11_INCLUDE_DIR`` in case ``CMAKE_INSTALL_INCLUDEDIR`` is
107+
absolute.
108+
`#3005 <https://github.com/pybind/pybind11/pull/3005>`_
109+
110+
* Fix bug not respecting ``WITH_SOABI`` or ``WITHOUT_SOABI`` to CMake.
111+
`#2938 <https://github.com/pybind/pybind11/pull/2938>`_
112+
113+
* Fix the default ``Pybind11Extension`` compilation flags with a Mingw64 python.
114+
`#2921 <https://github.com/pybind/pybind11/pull/2921>`_
115+
116+
* Clang on Windows: do not pass ``/MP`` (ignored flag).
117+
`#2824 <https://github.com/pybind/pybind11/pull/2824>`_
118+
119+
120+
121+
Backend and tidying up:
122+
123+
124+
* Add clang-tidy checks to further guard code style and remove all else after
125+
returns for better code readability. Also encourages following llvm-style
126+
(no ``else-after-returns``, proper usage of virtual functions in ctors and
127+
dtors).
128+
`#3080 <https://github.com/pybind/pybind11/pull/3080>`_
129+
130+
* Checks for common misspellings were added to the pre-commit hooks.
131+
`#3076 <https://github.com/pybind/pybind11/pull/3076>`_
132+
133+
* Enable and apply checks for more misc, readability, and code modernization
134+
improvements to the codebase. Remove redundant function ptr dereference,
135+
makes methods const, and uses member-initializers when possible to allow for
136+
trivial construction.
137+
`#3052 <https://github.com/pybind/pybind11/pull/3052>`_
138+
139+
* Enable clang-tidy performance checks throughout the codebase to enforce
140+
performant coding practices.
141+
`#3051 <https://github.com/pybind/pybind11/pull/3051>`_
142+
143+
* Enable more clang-tidy modernization checks.
144+
`#3049 <https://github.com/pybind/pybind11/pull/3049>`_
145+
146+
* Various performance micro-optimizations applied to the codebase using
147+
clang-tidy.
148+
`#3046 <https://github.com/pybind/pybind11/pull/3046>`_
149+
150+
* Changed ``Werror`` to stricter ``Werror-all`` for Intel compiler and fixed
151+
minor issues.
152+
`#2948 <https://github.com/pybind/pybind11/pull/2948>`_
153+
154+
* Fixed compilation with GCC < 5 when the user defines ``_GLIBCXX_USE_CXX11_ABI``.
155+
`#2956 <https://github.com/pybind/pybind11/pull/2956>`_
156+
157+
158+
159+
18160

19161
v2.6.2 (Jan 26, 2021)
20162
---------------------

0 commit comments

Comments
 (0)