blob: fbb3667f27cc827126c04b839240fecae203d0c5 [file] [log] [blame]
Wenzel Jakob1ae77fe2016-01-17 22:36:43 +01001.. _changelog:
2
3Changelog
4#########
5
Wenzel Jakobed52f462016-12-26 13:18:26 +01006Starting with version 1.8.0, pybind11 releases use a `semantic versioning
Wenzel Jakobd3549d62016-12-23 16:01:04 +01007<http://semver.org>`_ policy.
Wenzel Jakobf9502152016-06-14 15:00:46 +02008
Henry Schreiner1729aae2020-08-19 12:26:26 -04009v2.6.0 (IN PROGRESS)
10--------------------
11
12See :ref:`upgrade-guide-2.6` for help upgrading to the new version.
13
14* Minimum CMake required increased to 3.4.
15 `#2338 <https://github.com/pybind/pybind11/pull/2338>`_ and
16 `#2370 <https://github.com/pybind/pybind11/pull/2370>`_
17
18 * Full integration with CMake’s C++ standard system replaces
19 ``PYBIND11_CPP_STANDARD``.
20
21 * Generated config file is now portable to different Python/compiler/CMake
22 versions.
23
24 * Virtual environments prioritized if ``PYTHON_EXECUTABLE`` is not set
25 (``venv``, ``virtualenv``, and ``conda``) (similar to the new FindPython
26 mode).
27
28 * Other CMake features now natively supported, like
29 ``CMAKE_INTERPROCEDURAL_OPTIMIZATION``, ``set(CMAKE_CXX_VISIBILITY_PRESET
30 hidden)``.
31
32* Optional :ref:`find-python-mode` and :ref:`nopython-mode` with CMake.
33 `#2370 <https://github.com/pybind/pybind11/pull/2370>`_
34
35* Uninstall target added.
36 `#2265 <https://github.com/pybind/pybind11/pull/2265>`_ and
37 `#2346 <https://github.com/pybind/pybind11/pull/2346>`_
38
39
40
41
Wenzel Jakob3b1dbeb2020-03-31 12:55:48 +020042v2.5.0 (Mar 31, 2020)
43-----------------------------------------------------
44
45* Use C++17 fold expressions in type casters, if available. This can
46 improve performance during overload resolution when functions have
47 multiple arguments.
48 `#2043 <https://github.com/pybind/pybind11/pull/2043>`_.
49
50* Changed include directory resolution in ``pybind11/__init__.py``
51 and installation in ``setup.py``. This fixes a number of open issues
52 where pybind11 headers could not be found in certain environments.
53 `#1995 <https://github.com/pybind/pybind11/pull/1995>`_.
54
55* C++20 ``char8_t`` and ``u8string`` support. `#2026
56 <https://github.com/pybind/pybind11/pull/2026>`_.
57
58* CMake: search for Python 3.9. `bb9c91
59 <https://github.com/pybind/pybind11/commit/bb9c91>`_.
60
61* Fixes for MSYS-based build environments.
62 `#2087 <https://github.com/pybind/pybind11/pull/2087>`_,
63 `#2053 <https://github.com/pybind/pybind11/pull/2053>`_.
64
65* STL bindings for ``std::vector<...>::clear``. `#2074
66 <https://github.com/pybind/pybind11/pull/2074>`_.
67
68* Read-only flag for ``py::buffer``. `#1466
69 <https://github.com/pybind/pybind11/pull/1466>`_.
70
71* Exception handling during module initialization.
72 `bf2b031 <https://github.com/pybind/pybind11/commit/bf2b031>`_.
73
74* Support linking against a CPython debug build.
75 `#2025 <https://github.com/pybind/pybind11/pull/2025>`_.
76
77* Fixed issues involving the availability and use of aligned ``new`` and
78 ``delete``. `#1988 <https://github.com/pybind/pybind11/pull/1988>`_,
79 `759221 <https://github.com/pybind/pybind11/commit/759221>`_.
80
81* Fixed a resource leak upon interpreter shutdown.
82 `#2020 <https://github.com/pybind/pybind11/pull/2020>`_.
83
84* Fixed error handling in the boolean caster.
85 `#1976 <https://github.com/pybind/pybind11/pull/1976>`_.
86
Wenzel Jakob80d45242019-10-15 01:57:24 +020087v2.4.3 (Oct 15, 2019)
88-----------------------------------------------------
89
90* Adapt pybind11 to a C API convention change in Python 3.8. `#1950
91 <https://github.com/pybind/pybind11/pull/1950>`_.
92
Wenzel Jakob7ec2ddf2019-09-21 20:19:58 +020093v2.4.2 (Sep 21, 2019)
94-----------------------------------------------------
95
96* Replaced usage of a C++14 only construct. `#1929
97 <https://github.com/pybind/pybind11/pull/1929>`_.
98
99* Made an ifdef future-proof for Python >= 4. `f3109d
100 <https://github.com/pybind/pybind11/commit/f3109d>`_.
101
Wenzel Jakobe44fcc32019-09-20 11:10:49 +0200102v2.4.1 (Sep 20, 2019)
103-----------------------------------------------------
104
105* Fixed a problem involving implicit conversion from enumerations to integers
Wenzel Jakob7ec2ddf2019-09-21 20:19:58 +0200106 on Python 3.8. `#1780 <https://github.com/pybind/pybind11/pull/1780>`_.
Wenzel Jakobe44fcc32019-09-20 11:10:49 +0200107
Wenzel Jakob00a0aa92019-09-19 23:06:22 +0200108v2.4.0 (Sep 19, 2019)
Wenzel Jakob64f2a5f2019-06-12 21:03:40 +0200109-----------------------------------------------------
110
Wenzel Jakob00a0aa92019-09-19 23:06:22 +0200111* Try harder to keep pybind11-internal data structures separate when there
112 are potential ABI incompatibilities. Fixes crashes that occurred when loading
113 multiple pybind11 extensions that were e.g. compiled by GCC (libstdc++)
114 and Clang (libc++).
Wenzel Jakobe44fcc32019-09-20 11:10:49 +0200115 `#1588 <https://github.com/pybind/pybind11/pull/1588>`_ and
Wenzel Jakob00a0aa92019-09-19 23:06:22 +0200116 `c9f5a <https://github.com/pybind/pybind11/commit/c9f5a>`_.
117
118* Added support for ``__await__``, ``__aiter__``, and ``__anext__`` protocols.
Wenzel Jakobe44fcc32019-09-20 11:10:49 +0200119 `#1842 <https://github.com/pybind/pybind11/pull/1842>`_.
Wenzel Jakob00a0aa92019-09-19 23:06:22 +0200120
121* ``pybind11_add_module()``: don't strip symbols when compiling in
Wenzel Jakobe44fcc32019-09-20 11:10:49 +0200122 ``RelWithDebInfo`` mode. `#1980
Wenzel Jakob00a0aa92019-09-19 23:06:22 +0200123 <https://github.com/pybind/pybind11/pull/1980>`_.
124
125* ``enum_``: Reproduce Python behavior when comparing against invalid values
126 (e.g. ``None``, strings, etc.). Add back support for ``__invert__()``.
Wenzel Jakobe44fcc32019-09-20 11:10:49 +0200127 `#1912 <https://github.com/pybind/pybind11/pull/1912>`_,
128 `#1907 <https://github.com/pybind/pybind11/pull/1907>`_.
Wenzel Jakob00a0aa92019-09-19 23:06:22 +0200129
130* List insertion operation for ``py::list``.
131 Added ``.empty()`` to all collection types.
132 Added ``py::set::contains()`` and ``py::dict::contains()``.
Wenzel Jakobe44fcc32019-09-20 11:10:49 +0200133 `#1887 <https://github.com/pybind/pybind11/pull/1887>`_,
134 `#1884 <https://github.com/pybind/pybind11/pull/1884>`_,
135 `#1888 <https://github.com/pybind/pybind11/pull/1888>`_.
Wenzel Jakob00a0aa92019-09-19 23:06:22 +0200136
Andre Schmeißer19189b42019-08-19 12:54:33 +0200137* ``py::details::overload_cast_impl`` is available in C++11 mode, can be used
138 like ``overload_cast`` with an additional set of parantheses.
Wenzel Jakobe44fcc32019-09-20 11:10:49 +0200139 `#1581 <https://github.com/pybind/pybind11/pull/1581>`_.
Wenzel Jakob64f2a5f2019-06-12 21:03:40 +0200140
Wenzel Jakob00a0aa92019-09-19 23:06:22 +0200141* Fixed ``get_include()`` on Conda.
Wenzel Jakobe44fcc32019-09-20 11:10:49 +0200142 `#1877 <https://github.com/pybind/pybind11/pull/1877>`_.
Wenzel Jakob00a0aa92019-09-19 23:06:22 +0200143
144* ``stl_bind.h``: negative indexing support.
Wenzel Jakobe44fcc32019-09-20 11:10:49 +0200145 `#1882 <https://github.com/pybind/pybind11/pull/1882>`_.
Wenzel Jakob00a0aa92019-09-19 23:06:22 +0200146
147* Minor CMake fix to add MinGW compatibility.
Wenzel Jakobe44fcc32019-09-20 11:10:49 +0200148 `#1851 <https://github.com/pybind/pybind11/pull/1851>`_.
Wenzel Jakob00a0aa92019-09-19 23:06:22 +0200149
150* GIL-related fixes.
Wenzel Jakobe44fcc32019-09-20 11:10:49 +0200151 `#1836 <https://github.com/pybind/pybind11/pull/1836>`_,
Wenzel Jakob00a0aa92019-09-19 23:06:22 +0200152 `8b90b <https://github.com/pybind/pybind11/commit/8b90b>`_.
153
154* Other very minor/subtle fixes and improvements.
Wenzel Jakobe44fcc32019-09-20 11:10:49 +0200155 `#1329 <https://github.com/pybind/pybind11/pull/1329>`_,
156 `#1910 <https://github.com/pybind/pybind11/pull/1910>`_,
157 `#1863 <https://github.com/pybind/pybind11/pull/1863>`_,
158 `#1847 <https://github.com/pybind/pybind11/pull/1847>`_,
159 `#1890 <https://github.com/pybind/pybind11/pull/1890>`_,
160 `#1860 <https://github.com/pybind/pybind11/pull/1860>`_,
161 `#1848 <https://github.com/pybind/pybind11/pull/1848>`_,
162 `#1821 <https://github.com/pybind/pybind11/pull/1821>`_,
163 `#1837 <https://github.com/pybind/pybind11/pull/1837>`_,
164 `#1833 <https://github.com/pybind/pybind11/pull/1833>`_,
165 `#1748 <https://github.com/pybind/pybind11/pull/1748>`_,
166 `#1852 <https://github.com/pybind/pybind11/pull/1852>`_.
Wenzel Jakob00a0aa92019-09-19 23:06:22 +0200167
Wenzel Jakobcf36e3d2019-06-11 22:03:10 +0200168v2.3.0 (June 11, 2019)
Wenzel Jakob8cf091a2017-08-31 14:01:08 +0200169-----------------------------------------------------
170
Dean Moldovan56613942017-07-02 12:52:00 +0200171* Significantly reduced module binary size (10-20%) when compiled in C++11 mode
172 with GCC/Clang, or in any mode with MSVC. Function signatures are now always
173 precomputed at compile time (this was previously only available in C++14 mode
174 for non-MSVC compilers).
175 `#934 <https://github.com/pybind/pybind11/pull/934>`_.
Wenzel Jakob8cf091a2017-08-31 14:01:08 +0200176
Wenzel Jakob35c82c72018-09-11 10:08:48 +0200177* Add basic support for tag-based static polymorphism, where classes
178 provide a method to returns the desired type of an instance.
179 `#1326 <https://github.com/pybind/pybind11/pull/1326>`_.
180
Wenzel Jakobf4245182018-09-01 01:20:24 +0200181* Python type wrappers (``py::handle``, ``py::object``, etc.)
182 now support map Python's number protocol onto C++ arithmetic
183 operators such as ``operator+``, ``operator/=``, etc.
184 `#1511 <https://github.com/pybind/pybind11/pull/1511>`_.
185
Wenzel Jakob35c82c72018-09-11 10:08:48 +0200186* A number of improvements related to enumerations:
187
188 1. The ``enum_`` implementation was rewritten from scratch to reduce
189 code bloat. Rather than instantiating a full implementation for each
190 enumeration, most code is now contained in a generic base class.
191 `#1511 <https://github.com/pybind/pybind11/pull/1511>`_.
192
193 2. The ``value()`` method of ``py::enum_`` now accepts an optional
194 docstring that will be shown in the documentation of the associated
195 enumeration. `#1160 <https://github.com/pybind/pybind11/pull/1160>`_.
196
197 3. check for already existing enum value and throw an error if present.
198 `#1453 <https://github.com/pybind/pybind11/pull/1453>`_.
199
Wenzel Jakobcf36e3d2019-06-11 22:03:10 +0200200* Support for over-aligned type allocation via C++17's aligned ``new``
201 statement. `#1582 <https://github.com/pybind/pybind11/pull/1582>`_.
202
203* Added ``py::ellipsis()`` method for slicing of multidimensional NumPy arrays
Wenzel Jakob35c82c72018-09-11 10:08:48 +0200204 `#1502 <https://github.com/pybind/pybind11/pull/1502>`_.
205
Wenzel Jakobcf36e3d2019-06-11 22:03:10 +0200206* Numerous Improvements to the ``mkdoc.py`` script for extracting documentation
207 from C++ header files.
208 `#1788 <https://github.com/pybind/pybind11/pull/1788>`_.
209
Wenzel Jakob35c82c72018-09-11 10:08:48 +0200210* ``pybind11_add_module()``: allow including Python as a ``SYSTEM`` include path.
211 `#1416 <https://github.com/pybind/pybind11/pull/1416>`_.
212
Allan Leale76dff72018-10-11 10:28:12 +0200213* ``pybind11/stl.h`` does not convert strings to ``vector<string>`` anymore.
214 `#1258 <https://github.com/pybind/pybind11/issues/1258>`_.
215
Wenzel Jakobcf36e3d2019-06-11 22:03:10 +0200216* Mark static methods as such to fix auto-generated Sphinx documentation.
217 `#1732 <https://github.com/pybind/pybind11/pull/1732>`_.
218
219* Re-throw forced unwind exceptions (e.g. during pthread termination).
220 `#1208 <https://github.com/pybind/pybind11/pull/1208>`_.
221
222* Added ``__contains__`` method to the bindings of maps (``std::map``,
223 ``std::unordered_map``).
224 `#1767 <https://github.com/pybind/pybind11/pull/1767>`_.
225
226* Improvements to ``gil_scoped_acquire``.
227 `#1211 <https://github.com/pybind/pybind11/pull/1211>`_.
228
229* Type caster support for ``std::deque<T>``.
230 `#1609 <https://github.com/pybind/pybind11/pull/1609>`_.
231
232* Support for ``std::unique_ptr`` holders, whose deleters differ between a base and derived
233 class. `#1353 <https://github.com/pybind/pybind11/pull/1353>`_.
234
235* Construction of STL array/vector-like data structures from
236 iterators. Added an ``extend()`` operation.
237 `#1709 <https://github.com/pybind/pybind11/pull/1709>`_,
238
239* CMake build system improvements for projects that include non-C++
240 files (e.g. plain C, CUDA) in ``pybind11_add_module`` et al.
241 `#1678 <https://github.com/pybind/pybind11/pull/1678>`_.
242
243* Fixed asynchronous invocation and deallocation of Python functions
244 wrapped in ``std::function``.
245 `#1595 <https://github.com/pybind/pybind11/pull/1595>`_.
246
247* Fixes regarding return value policy propagation in STL type casters.
248 `#1603 <https://github.com/pybind/pybind11/pull/1603>`_.
249
250* Fixed scoped enum comparisons.
251 `#1571 <https://github.com/pybind/pybind11/pull/1571>`_.
252
253* Fixed iostream redirection for code that releases the GIL.
254 `#1368 <https://github.com/pybind/pybind11/pull/1368>`_,
255
256* A number of CI-related fixes.
257 `#1757 <https://github.com/pybind/pybind11/pull/1757>`_,
258 `#1744 <https://github.com/pybind/pybind11/pull/1744>`_,
259 `#1670 <https://github.com/pybind/pybind11/pull/1670>`_.
260
Wenzel Jakob35c82c72018-09-11 10:08:48 +0200261v2.2.4 (September 11, 2018)
262-----------------------------------------------------
263
264* Use new Python 3.7 Thread Specific Storage (TSS) implementation if available.
265 `#1454 <https://github.com/pybind/pybind11/pull/1454>`_,
266 `#1517 <https://github.com/pybind/pybind11/pull/1517>`_.
267
268* Fixes for newer MSVC versions and C++17 mode.
269 `#1347 <https://github.com/pybind/pybind11/pull/1347>`_,
270 `#1462 <https://github.com/pybind/pybind11/pull/1462>`_.
271
272* Propagate return value policies to type-specific casters
273 when casting STL containers.
274 `#1455 <https://github.com/pybind/pybind11/pull/1455>`_.
275
276* Allow ostream-redirection of more than 1024 characters.
277 `#1479 <https://github.com/pybind/pybind11/pull/1479>`_.
278
279* Set ``Py_DEBUG`` define when compiling against a debug Python build.
280 `#1438 <https://github.com/pybind/pybind11/pull/1438>`_.
281
282* Untangle integer logic in number type caster to work for custom
283 types that may only be castable to a restricted set of builtin types.
284 `#1442 <https://github.com/pybind/pybind11/pull/1442>`_.
285
286* CMake build system: Remember Python version in cache file.
287 `#1434 <https://github.com/pybind/pybind11/pull/1434>`_.
288
289* Fix for custom smart pointers: use ``std::addressof`` to obtain holder
290 address instead of ``operator&``.
291 `#1435 <https://github.com/pybind/pybind11/pull/1435>`_.
292
293* Properly report exceptions thrown during module initialization.
294 `#1362 <https://github.com/pybind/pybind11/pull/1362>`_.
295
296* Fixed a segmentation fault when creating empty-shaped NumPy array.
297 `#1371 <https://github.com/pybind/pybind11/pull/1371>`_.
298
299* The version of Intel C++ compiler must be >= 2017, and this is now checked by
300 the header files. `#1363 <https://github.com/pybind/pybind11/pull/1363>`_.
301
302* A few minor typo fixes and improvements to the test suite, and
303 patches that silence compiler warnings.
Wenzel Jakob6d190362017-11-16 22:24:36 +0100304
Chris Rusby22859bb2018-08-22 22:38:27 +0100305* Vectors now support construction from generators, as well as ``extend()`` from a
306 list or generator.
307 `#1496 <https://github.com/pybind/pybind11/pull/1496>`_.
308
309
Wenzel Jakobf5f66182018-04-29 15:47:03 +0200310v2.2.3 (April 29, 2018)
311-----------------------------------------------------
312
313* The pybind11 header location detection was replaced by a new implementation
314 that no longer depends on ``pip`` internals (the recently released ``pip``
315 10 has restricted access to this API).
316 `#1190 <https://github.com/pybind/pybind11/pull/1190>`_.
317
318* Small adjustment to an implementation detail to work around a compiler segmentation fault in Clang 3.3/3.4.
319 `#1350 <https://github.com/pybind/pybind11/pull/1350>`_.
320
321* The minimal supported version of the Intel compiler was >= 17.0 since
322 pybind11 v2.1. This check is now explicit, and a compile-time error is raised
323 if the compiler meet the requirement.
324 `#1363 <https://github.com/pybind/pybind11/pull/1363>`_.
325
326* Fixed an endianness-related fault in the test suite.
327 `#1287 <https://github.com/pybind/pybind11/pull/1287>`_.
Lori A. Burnsbdbe8d02018-04-29 07:48:25 -0400328
Wenzel Jakob2d0507d2018-02-07 11:05:41 +0100329v2.2.2 (February 7, 2018)
330-----------------------------------------------------
331
332* Fixed a segfault when combining embedded interpreter
333 shutdown/reinitialization with external loaded pybind11 modules.
334 `#1092 <https://github.com/pybind/pybind11/pull/1092>`_.
335
336* Eigen support: fixed a bug where Nx1/1xN numpy inputs couldn't be passed as
337 arguments to Eigen vectors (which for Eigen are simply compile-time fixed
338 Nx1/1xN matrices).
339 `#1106 <https://github.com/pybind/pybind11/pull/1106>`_.
340
341* Clarified to license by moving the licensing of contributions from
342 ``LICENSE`` into ``CONTRIBUTING.md``: the licensing of contributions is not
343 actually part of the software license as distributed. This isn't meant to be
344 a substantial change in the licensing of the project, but addresses concerns
345 that the clause made the license non-standard.
346 `#1109 <https://github.com/pybind/pybind11/issues/1109>`_.
347
348* Fixed a regression introduced in 2.1 that broke binding functions with lvalue
349 character literal arguments.
350 `#1128 <https://github.com/pybind/pybind11/pull/1128>`_.
351
352* MSVC: fix for compilation failures under /permissive-, and added the flag to
353 the appveyor test suite.
354 `#1155 <https://github.com/pybind/pybind11/pull/1155>`_.
355
356* Fixed ``__qualname__`` generation, and in turn, fixes how class names
357 (especially nested class names) are shown in generated docstrings.
358 `#1171 <https://github.com/pybind/pybind11/pull/1171>`_.
359
360* Updated the FAQ with a suggested project citation reference.
361 `#1189 <https://github.com/pybind/pybind11/pull/1189>`_.
362
363* Added fixes for deprecation warnings when compiled under C++17 with
364 ``-Wdeprecated`` turned on, and add ``-Wdeprecated`` to the test suite
365 compilation flags.
366 `#1191 <https://github.com/pybind/pybind11/pull/1191>`_.
367
368* Fixed outdated PyPI URLs in ``setup.py``.
369 `#1213 <https://github.com/pybind/pybind11/pull/1213>`_.
370
371* Fixed a refcount leak for arguments that end up in a ``py::args`` argument
372 for functions with both fixed positional and ``py::args`` arguments.
373 `#1216 <https://github.com/pybind/pybind11/pull/1216>`_.
374
375* Fixed a potential segfault resulting from possible premature destruction of
376 ``py::args``/``py::kwargs`` arguments with overloaded functions.
377 `#1223 <https://github.com/pybind/pybind11/pull/1223>`_.
378
379* Fixed ``del map[item]`` for a ``stl_bind.h`` bound stl map.
380 `#1229 <https://github.com/pybind/pybind11/pull/1229>`_.
381
382* Fixed a regression from v2.1.x where the aggregate initialization could
383 unintentionally end up at a constructor taking a templated
384 ``std::initializer_list<T>`` argument.
385 `#1249 <https://github.com/pybind/pybind11/pull/1249>`_.
386
387* Fixed an issue where calling a function with a keep_alive policy on the same
388 nurse/patient pair would cause the internal patient storage to needlessly
389 grow (unboundedly, if the nurse is long-lived).
390 `#1251 <https://github.com/pybind/pybind11/issues/1251>`_.
391
392* Various other minor fixes.
393
Wenzel Jakobf94d7592017-09-14 08:49:47 +0200394v2.2.1 (September 14, 2017)
Dean Moldovan7939f4b2017-09-04 13:49:19 +0200395-----------------------------------------------------
396
Dean Moldovan27680302017-09-13 19:04:25 +0200397* Added ``py::module::reload()`` member function for reloading a module.
398 `#1040 <https://github.com/pybind/pybind11/pull/1040>`_.
Dean Moldovanb0a0e4a2017-09-04 21:16:09 +0200399
Dean Moldovan953d2422017-09-10 16:53:02 +0200400* Fixed a reference leak in the number converter.
401 `#1078 <https://github.com/pybind/pybind11/pull/1078>`_.
402
Dean Moldovan27680302017-09-13 19:04:25 +0200403* Fixed compilation with Clang on host GCC < 5 (old libstdc++ which isn't fully
404 C++11 compliant). `#1062 <https://github.com/pybind/pybind11/pull/1062>`_.
405
Dean Moldovan3c4933c2017-09-01 21:42:20 +0200406* Fixed a regression where the automatic ``std::vector<bool>`` caster would
407 fail to compile. The same fix also applies to any container which returns
408 element proxies instead of references.
409 `#1053 <https://github.com/pybind/pybind11/pull/1053>`_.
410
Dean Moldovan7939f4b2017-09-04 13:49:19 +0200411* Fixed a regression where the ``py::keep_alive`` policy could not be applied
412 to constructors. `#1065 <https://github.com/pybind/pybind11/pull/1065>`_.
413
Dean Moldovan7b1de1e2017-09-03 01:31:47 +0200414* Fixed a nullptr dereference when loading a ``py::module_local`` type
415 that's only registered in an external module.
416 `#1058 <https://github.com/pybind/pybind11/pull/1058>`_.
417
Dean Moldovan27680302017-09-13 19:04:25 +0200418* Fixed implicit conversion of accessors to types derived from ``py::object``.
419 `#1076 <https://github.com/pybind/pybind11/pull/1076>`_.
420
421* The ``name`` in ``PYBIND11_MODULE(name, variable)`` can now be a macro.
422 `#1082 <https://github.com/pybind/pybind11/pull/1082>`_.
423
424* Relaxed overly strict ``py::pickle()`` check for matching get and set types.
425 `#1064 <https://github.com/pybind/pybind11/pull/1064>`_.
426
Dean Moldovan2b4477e2017-09-09 20:21:34 +0200427* Conversion errors now try to be more informative when it's likely that
428 a missing header is the cause (e.g. forgetting ``<pybind11/stl.h>``).
429 `#1077 <https://github.com/pybind/pybind11/pull/1077>`_.
430
Wenzel Jakob2a5a5ec2017-08-31 13:58:24 +0200431v2.2.0 (August 31, 2017)
Wenzel Jakobd405b1b2017-03-22 22:20:07 +0100432-----------------------------------------------------
433
Dean Moldovandb46a892017-08-13 22:25:15 +0200434* Support for embedding the Python interpreter. See the
435 :doc:`documentation page </advanced/embedding>` for a
436 full overview of the new features.
437 `#774 <https://github.com/pybind/pybind11/pull/774>`_,
438 `#889 <https://github.com/pybind/pybind11/pull/889>`_,
439 `#892 <https://github.com/pybind/pybind11/pull/892>`_,
440 `#920 <https://github.com/pybind/pybind11/pull/920>`_.
441
442 .. code-block:: cpp
443
444 #include <pybind11/embed.h>
445 namespace py = pybind11;
446
447 int main() {
448 py::scoped_interpreter guard{}; // start the interpreter and keep it alive
449
450 py::print("Hello, World!"); // use the Python API
451 }
452
453* Support for inheriting from multiple C++ bases in Python.
454 `#693 <https://github.com/pybind/pybind11/pull/693>`_.
455
456 .. code-block:: python
457
458 from cpp_module import CppBase1, CppBase2
459
460 class PyDerived(CppBase1, CppBase2):
461 def __init__(self):
462 CppBase1.__init__(self) # C++ bases must be initialized explicitly
463 CppBase2.__init__(self)
464
465* ``PYBIND11_MODULE`` is now the preferred way to create module entry points.
466 ``PYBIND11_PLUGIN`` is deprecated. See :ref:`macros` for details.
467 `#879 <https://github.com/pybind/pybind11/pull/879>`_.
468
469 .. code-block:: cpp
470
471 // new
472 PYBIND11_MODULE(example, m) {
473 m.def("add", [](int a, int b) { return a + b; });
474 }
475
476 // old
477 PYBIND11_PLUGIN(example) {
478 py::module m("example");
479 m.def("add", [](int a, int b) { return a + b; });
480 return m.ptr();
481 }
482
483* pybind11's headers and build system now more strictly enforce hidden symbol
484 visibility for extension modules. This should be seamless for most users,
Dean Moldovan1fb9df62017-08-18 19:26:49 +0200485 but see the :doc:`upgrade` if you use a custom build system.
486 `#995 <https://github.com/pybind/pybind11/pull/995>`_.
Dean Moldovandb46a892017-08-13 22:25:15 +0200487
488* Support for ``py::module_local`` types which allow multiple modules to
489 export the same C++ types without conflicts. This is useful for opaque
490 types like ``std::vector<int>``. ``py::bind_vector`` and ``py::bind_map``
491 now default to ``py::module_local`` if their elements are builtins or
492 local types. See :ref:`module_local` for details.
493 `#949 <https://github.com/pybind/pybind11/pull/949>`_,
494 `#981 <https://github.com/pybind/pybind11/pull/981>`_,
495 `#995 <https://github.com/pybind/pybind11/pull/995>`_,
496 `#997 <https://github.com/pybind/pybind11/pull/997>`_.
497
498* Custom constructors can now be added very easily using lambdas or factory
499 functions which return a class instance by value, pointer or holder. This
500 supersedes the old placement-new ``__init__`` technique.
501 See :ref:`custom_constructors` for details.
Dean Moldovan4c540442017-08-30 21:53:08 +0200502 `#805 <https://github.com/pybind/pybind11/pull/805>`_,
503 `#1014 <https://github.com/pybind/pybind11/pull/1014>`_.
Dean Moldovandb46a892017-08-13 22:25:15 +0200504
505 .. code-block:: cpp
506
507 struct Example {
508 Example(std::string);
509 };
510
511 py::class_<Example>(m, "Example")
512 .def(py::init<std::string>()) // existing constructor
513 .def(py::init([](int n) { // custom constructor
514 return std::make_unique<Example>(std::to_string(n));
515 }));
516
Dean Moldovan1e5a7da2017-08-24 01:53:15 +0200517* Similarly to custom constructors, pickling support functions are now bound
518 using the ``py::pickle()`` adaptor which improves type safety. See the
519 :doc:`upgrade` and :ref:`pickling` for details.
520 `#1038 <https://github.com/pybind/pybind11/pull/1038>`_.
521
Dean Moldovandb46a892017-08-13 22:25:15 +0200522* Builtin support for converting C++17 standard library types and general
523 conversion improvements:
524
525 1. C++17 ``std::variant`` is supported right out of the box. C++11/14
526 equivalents (e.g. ``boost::variant``) can also be added with a simple
527 user-defined specialization. See :ref:`cpp17_container_casters` for details.
528 `#811 <https://github.com/pybind/pybind11/pull/811>`_,
529 `#845 <https://github.com/pybind/pybind11/pull/845>`_,
530 `#989 <https://github.com/pybind/pybind11/pull/989>`_.
531
532 2. Out-of-the-box support for C++17 ``std::string_view``.
533 `#906 <https://github.com/pybind/pybind11/pull/906>`_.
534
535 3. Improved compatibility of the builtin ``optional`` converter.
536 `#874 <https://github.com/pybind/pybind11/pull/874>`_.
537
538 4. The ``bool`` converter now accepts ``numpy.bool_`` and types which
539 define ``__bool__`` (Python 3.x) or ``__nonzero__`` (Python 2.7).
540 `#925 <https://github.com/pybind/pybind11/pull/925>`_.
541
542 5. C++-to-Python casters are now more efficient and move elements out
543 of rvalue containers whenever possible.
544 `#851 <https://github.com/pybind/pybind11/pull/851>`_,
545 `#936 <https://github.com/pybind/pybind11/pull/936>`_,
546 `#938 <https://github.com/pybind/pybind11/pull/938>`_.
547
548 6. Fixed ``bytes`` to ``std::string/char*`` conversion on Python 3.
549 `#817 <https://github.com/pybind/pybind11/pull/817>`_.
550
551 7. Fixed lifetime of temporary C++ objects created in Python-to-C++ conversions.
552 `#924 <https://github.com/pybind/pybind11/pull/924>`_.
553
Henry Schreiner8b405052017-08-24 17:12:43 -0700554* Scope guard call policy for RAII types, e.g. ``py::call_guard<py::gil_scoped_release>()``,
555 ``py::call_guard<py::scoped_ostream_redirect>()``. See :ref:`call_policies` for details.
Dean Moldovandb46a892017-08-13 22:25:15 +0200556 `#740 <https://github.com/pybind/pybind11/pull/740>`_.
557
Henry Schreiner8b405052017-08-24 17:12:43 -0700558* Utility for redirecting C++ streams to Python (e.g. ``std::cout`` ->
559 ``sys.stdout``). Scope guard ``py::scoped_ostream_redirect`` in C++ and
560 a context manager in Python. See :ref:`ostream_redirect`.
561 `#1009 <https://github.com/pybind/pybind11/pull/1009>`_.
562
Dean Moldovandb46a892017-08-13 22:25:15 +0200563* Improved handling of types and exceptions across module boundaries.
564 `#915 <https://github.com/pybind/pybind11/pull/915>`_,
565 `#951 <https://github.com/pybind/pybind11/pull/951>`_,
566 `#995 <https://github.com/pybind/pybind11/pull/995>`_.
567
568* Fixed destruction order of ``py::keep_alive`` nurse/patient objects
569 in reference cycles.
570 `#856 <https://github.com/pybind/pybind11/pull/856>`_.
571
572* Numpy and buffer protocol related improvements:
573
574 1. Support for negative strides in Python buffer objects/numpy arrays. This
575 required changing integers from unsigned to signed for the related C++ APIs.
576 Note: If you have compiler warnings enabled, you may notice some new conversion
577 warnings after upgrading. These can be resolved with ``static_cast``.
578 `#782 <https://github.com/pybind/pybind11/pull/782>`_.
579
580 2. Support ``std::complex`` and arrays inside ``PYBIND11_NUMPY_DTYPE``.
581 `#831 <https://github.com/pybind/pybind11/pull/831>`_,
582 `#832 <https://github.com/pybind/pybind11/pull/832>`_.
583
584 3. Support for constructing ``py::buffer_info`` and ``py::arrays`` using
585 arbitrary containers or iterators instead of requiring a ``std::vector``.
586 `#788 <https://github.com/pybind/pybind11/pull/788>`_,
587 `#822 <https://github.com/pybind/pybind11/pull/822>`_,
588 `#860 <https://github.com/pybind/pybind11/pull/860>`_.
589
590 4. Explicitly check numpy version and require >= 1.7.0.
591 `#819 <https://github.com/pybind/pybind11/pull/819>`_.
592
593* Support for allowing/prohibiting ``None`` for specific arguments and improved
594 ``None`` overload resolution order. See :ref:`none_arguments` for details.
595 `#843 <https://github.com/pybind/pybind11/pull/843>`_.
596 `#859 <https://github.com/pybind/pybind11/pull/859>`_.
597
598* Added ``py::exec()`` as a shortcut for ``py::eval<py::eval_statements>()``
599 and support for C++11 raw string literals as input. See :ref:`eval`.
600 `#766 <https://github.com/pybind/pybind11/pull/766>`_,
601 `#827 <https://github.com/pybind/pybind11/pull/827>`_.
602
603* ``py::vectorize()`` ignores non-vectorizable arguments and supports
604 member functions.
605 `#762 <https://github.com/pybind/pybind11/pull/762>`_.
606
607* Support for bound methods as callbacks (``pybind11/functional.h``).
608 `#815 <https://github.com/pybind/pybind11/pull/815>`_.
609
610* Allow aliasing pybind11 methods: ``cls.attr("foo") = cls.attr("bar")``.
611 `#802 <https://github.com/pybind/pybind11/pull/802>`_.
612
613* Don't allow mixed static/non-static overloads.
614 `#804 <https://github.com/pybind/pybind11/pull/804>`_.
615
616* Fixed overriding static properties in derived classes.
617 `#784 <https://github.com/pybind/pybind11/pull/784>`_.
618
Wenzel Jakobcf36e3d2019-06-11 22:03:10 +0200619* Added support for write only properties.
620 `#1144 <https://github.com/pybind/pybind11/pull/1144>`_.
621
Dean Moldovan4c540442017-08-30 21:53:08 +0200622* Improved deduction of member functions of a derived class when its bases
623 aren't registered with pybind11.
Dean Moldovandb46a892017-08-13 22:25:15 +0200624 `#855 <https://github.com/pybind/pybind11/pull/855>`_.
625
626 .. code-block:: cpp
627
628 struct Base {
629 int foo() { return 42; }
630 }
631
632 struct Derived : Base {}
633
634 // Now works, but previously required also binding `Base`
635 py::class_<Derived>(m, "Derived")
636 .def("foo", &Derived::foo); // function is actually from `Base`
637
Wenzel Jakobb12a9d62017-08-23 16:30:56 +0200638* The implementation of ``py::init<>`` now uses C++11 brace initialization
639 syntax to construct instances, which permits binding implicit constructors of
640 aggregate types. `#1015 <https://github.com/pybind/pybind11/pull/1015>`_.
641
642 .. code-block:: cpp
643
644 struct Aggregate {
645 int a;
646 std::string b;
647 };
648
649 py::class_<Aggregate>(m, "Aggregate")
650 .def(py::init<int, const std::string &>());
651
Dean Moldovandb46a892017-08-13 22:25:15 +0200652* Fixed issues with multiple inheritance with offset base/derived pointers.
653 `#812 <https://github.com/pybind/pybind11/pull/812>`_,
654 `#866 <https://github.com/pybind/pybind11/pull/866>`_,
655 `#960 <https://github.com/pybind/pybind11/pull/960>`_.
656
Dean Moldovan4c540442017-08-30 21:53:08 +0200657* Fixed reference leak of type objects.
658 `#1030 <https://github.com/pybind/pybind11/pull/1030>`_.
659
Dean Moldovandb46a892017-08-13 22:25:15 +0200660* Improved support for the ``/std:c++14`` and ``/std:c++latest`` modes
661 on MSVC 2017.
662 `#841 <https://github.com/pybind/pybind11/pull/841>`_,
663 `#999 <https://github.com/pybind/pybind11/pull/999>`_.
664
665* Fixed detection of private operator new on MSVC.
666 `#893 <https://github.com/pybind/pybind11/pull/893>`_,
667 `#918 <https://github.com/pybind/pybind11/pull/918>`_.
668
669* Intel C++ compiler compatibility fixes.
670 `#937 <https://github.com/pybind/pybind11/pull/937>`_.
671
672* Fixed implicit conversion of `py::enum_` to integer types on Python 2.7.
673 `#821 <https://github.com/pybind/pybind11/pull/821>`_.
674
Bruce Merry37de2da2017-08-30 14:22:00 +0200675* Added ``py::hash`` to fetch the hash value of Python objects, and
676 ``.def(hash(py::self))`` to provide the C++ ``std::hash`` as the Python
677 ``__hash__`` method.
678 `#1034 <https://github.com/pybind/pybind11/pull/1034>`_.
679
Dean Moldovandb46a892017-08-13 22:25:15 +0200680* Fixed ``__truediv__`` on Python 2 and ``__itruediv__`` on Python 3.
681 `#867 <https://github.com/pybind/pybind11/pull/867>`_.
682
683* ``py::capsule`` objects now support the ``name`` attribute. This is useful
684 for interfacing with ``scipy.LowLevelCallable``.
685 `#902 <https://github.com/pybind/pybind11/pull/902>`_.
686
687* Fixed ``py::make_iterator``'s ``__next__()`` for past-the-end calls.
688 `#897 <https://github.com/pybind/pybind11/pull/897>`_.
689
690* Added ``error_already_set::matches()`` for checking Python exceptions.
691 `#772 <https://github.com/pybind/pybind11/pull/772>`_.
692
693* Deprecated ``py::error_already_set::clear()``. It's no longer needed
694 following a simplification of the ``py::error_already_set`` class.
695 `#954 <https://github.com/pybind/pybind11/pull/954>`_.
696
697* Deprecated ``py::handle::operator==()`` in favor of ``py::handle::is()``
698 `#825 <https://github.com/pybind/pybind11/pull/825>`_.
699
700* Deprecated ``py::object::borrowed``/``py::object::stolen``.
701 Use ``py::object::borrowed_t{}``/``py::object::stolen_t{}`` instead.
702 `#771 <https://github.com/pybind/pybind11/pull/771>`_.
703
Dean Moldovan4c540442017-08-30 21:53:08 +0200704* Changed internal data structure versioning to avoid conflicts between
705 modules compiled with different revisions of pybind11.
706 `#1012 <https://github.com/pybind/pybind11/pull/1012>`_.
707
Dean Moldovandb46a892017-08-13 22:25:15 +0200708* Additional compile-time and run-time error checking and more informative messages.
709 `#786 <https://github.com/pybind/pybind11/pull/786>`_,
710 `#794 <https://github.com/pybind/pybind11/pull/794>`_,
711 `#803 <https://github.com/pybind/pybind11/pull/803>`_.
712
713* Various minor improvements and fixes.
714 `#764 <https://github.com/pybind/pybind11/pull/764>`_,
715 `#791 <https://github.com/pybind/pybind11/pull/791>`_,
716 `#795 <https://github.com/pybind/pybind11/pull/795>`_,
717 `#840 <https://github.com/pybind/pybind11/pull/840>`_,
718 `#844 <https://github.com/pybind/pybind11/pull/844>`_,
719 `#846 <https://github.com/pybind/pybind11/pull/846>`_,
720 `#849 <https://github.com/pybind/pybind11/pull/849>`_,
721 `#858 <https://github.com/pybind/pybind11/pull/858>`_,
722 `#862 <https://github.com/pybind/pybind11/pull/862>`_,
723 `#871 <https://github.com/pybind/pybind11/pull/871>`_,
724 `#872 <https://github.com/pybind/pybind11/pull/872>`_,
725 `#881 <https://github.com/pybind/pybind11/pull/881>`_,
726 `#888 <https://github.com/pybind/pybind11/pull/888>`_,
727 `#899 <https://github.com/pybind/pybind11/pull/899>`_,
728 `#928 <https://github.com/pybind/pybind11/pull/928>`_,
729 `#931 <https://github.com/pybind/pybind11/pull/931>`_,
730 `#944 <https://github.com/pybind/pybind11/pull/944>`_,
731 `#950 <https://github.com/pybind/pybind11/pull/950>`_,
732 `#952 <https://github.com/pybind/pybind11/pull/952>`_,
733 `#962 <https://github.com/pybind/pybind11/pull/962>`_,
734 `#965 <https://github.com/pybind/pybind11/pull/965>`_,
735 `#970 <https://github.com/pybind/pybind11/pull/970>`_,
Dean Moldovandb46a892017-08-13 22:25:15 +0200736 `#978 <https://github.com/pybind/pybind11/pull/978>`_,
Dean Moldovan4c540442017-08-30 21:53:08 +0200737 `#979 <https://github.com/pybind/pybind11/pull/979>`_,
Wenzel Jakoba1041192017-08-28 16:35:32 +0200738 `#986 <https://github.com/pybind/pybind11/pull/986>`_,
Dean Moldovan4c540442017-08-30 21:53:08 +0200739 `#1020 <https://github.com/pybind/pybind11/pull/1020>`_,
740 `#1027 <https://github.com/pybind/pybind11/pull/1027>`_,
Wenzel Jakoba1041192017-08-28 16:35:32 +0200741 `#1037 <https://github.com/pybind/pybind11/pull/1037>`_.
Dean Moldovandb46a892017-08-13 22:25:15 +0200742
743* Testing improvements.
744 `#798 <https://github.com/pybind/pybind11/pull/798>`_,
745 `#882 <https://github.com/pybind/pybind11/pull/882>`_,
746 `#898 <https://github.com/pybind/pybind11/pull/898>`_,
747 `#900 <https://github.com/pybind/pybind11/pull/900>`_,
748 `#921 <https://github.com/pybind/pybind11/pull/921>`_,
749 `#923 <https://github.com/pybind/pybind11/pull/923>`_,
750 `#963 <https://github.com/pybind/pybind11/pull/963>`_.
751
Wenzel Jakobdb200952017-04-07 02:03:46 +0200752v2.1.1 (April 7, 2017)
753-----------------------------------------------------
754
755* Fixed minimum version requirement for MSVC 2015u3
756 `#773 <https://github.com/pybind/pybind11/pull/773>`_.
757
Wenzel Jakobd405b1b2017-03-22 22:20:07 +0100758v2.1.0 (March 22, 2017)
Wenzel Jakoba9730be2017-01-06 14:18:44 +0100759-----------------------------------------------------
760
Wenzel Jakob62e5fef2017-03-22 22:07:45 +0100761* pybind11 now performs function overload resolution in two phases. The first
762 phase only considers exact type matches, while the second allows for implicit
763 conversions to take place. A special ``noconvert()`` syntax can be used to
764 completely disable implicit conversions for specific arguments.
765 `#643 <https://github.com/pybind/pybind11/pull/643>`_,
766 `#634 <https://github.com/pybind/pybind11/pull/634>`_,
767 `#650 <https://github.com/pybind/pybind11/pull/650>`_.
768
769* Fixed a regression where static properties no longer worked with classes
770 using multiple inheritance. The ``py::metaclass`` attribute is no longer
771 necessary (and deprecated as of this release) when binding classes with
772 static properties.
773 `#679 <https://github.com/pybind/pybind11/pull/679>`_,
774
775* Classes bound using ``pybind11`` can now use custom metaclasses.
776 `#679 <https://github.com/pybind/pybind11/pull/679>`_,
777
778* ``py::args`` and ``py::kwargs`` can now be mixed with other positional
779 arguments when binding functions using pybind11.
780 `#611 <https://github.com/pybind/pybind11/pull/611>`_.
781
782* Improved support for C++11 unicode string and character types; added
783 extensive documentation regarding pybind11's string conversion behavior.
784 `#624 <https://github.com/pybind/pybind11/pull/624>`_,
785 `#636 <https://github.com/pybind/pybind11/pull/636>`_,
786 `#715 <https://github.com/pybind/pybind11/pull/715>`_.
787
788* pybind11 can now avoid expensive copies when converting Eigen arrays to NumPy
789 arrays (and vice versa). `#610 <https://github.com/pybind/pybind11/pull/610>`_.
790
791* The "fast path" in ``py::vectorize`` now works for any full-size group of C or
792 F-contiguous arrays. The non-fast path is also faster since it no longer performs
793 copies of the input arguments (except when type conversions are necessary).
794 `#610 <https://github.com/pybind/pybind11/pull/610>`_.
795
796* Added fast, unchecked access to NumPy arrays via a proxy object.
797 `#746 <https://github.com/pybind/pybind11/pull/746>`_.
798
Wenzel Jakob0d929382017-03-22 22:52:29 +0100799* Transparent support for class-specific ``operator new`` and
Wenzel Jakob62e5fef2017-03-22 22:07:45 +0100800 ``operator delete`` implementations.
801 `#755 <https://github.com/pybind/pybind11/pull/755>`_.
802
803* Slimmer and more efficient STL-compatible iterator interface for sequence types.
804 `#662 <https://github.com/pybind/pybind11/pull/662>`_.
805
806* Improved custom holder type support.
807 `#607 <https://github.com/pybind/pybind11/pull/607>`_.
808
809* ``nullptr`` to ``None`` conversion fixed in various builtin type casters.
810 `#732 <https://github.com/pybind/pybind11/pull/732>`_.
811
812* ``enum_`` now exposes its members via a special ``__members__`` attribute.
813 `#666 <https://github.com/pybind/pybind11/pull/666>`_.
814
815* ``std::vector`` bindings created using ``stl_bind.h`` can now optionally
816 implement the buffer protocol. `#488 <https://github.com/pybind/pybind11/pull/488>`_.
817
818* Automated C++ reference documentation using doxygen and breathe.
819 `#598 <https://github.com/pybind/pybind11/pull/598>`_.
820
821* Added minimum compiler version assertions.
822 `#727 <https://github.com/pybind/pybind11/pull/727>`_.
823
824* Improved compatibility with C++1z.
825 `#677 <https://github.com/pybind/pybind11/pull/677>`_.
826
827* Improved ``py::capsule`` API. Can be used to implement cleanup
828 callbacks that are involved at module destruction time.
829 `#752 <https://github.com/pybind/pybind11/pull/752>`_.
830
831* Various minor improvements and fixes.
832 `#595 <https://github.com/pybind/pybind11/pull/595>`_,
833 `#588 <https://github.com/pybind/pybind11/pull/588>`_,
834 `#589 <https://github.com/pybind/pybind11/pull/589>`_,
835 `#603 <https://github.com/pybind/pybind11/pull/603>`_,
836 `#619 <https://github.com/pybind/pybind11/pull/619>`_,
837 `#648 <https://github.com/pybind/pybind11/pull/648>`_,
838 `#695 <https://github.com/pybind/pybind11/pull/695>`_,
839 `#720 <https://github.com/pybind/pybind11/pull/720>`_,
840 `#723 <https://github.com/pybind/pybind11/pull/723>`_,
841 `#729 <https://github.com/pybind/pybind11/pull/729>`_,
842 `#724 <https://github.com/pybind/pybind11/pull/724>`_,
843 `#742 <https://github.com/pybind/pybind11/pull/742>`_,
844 `#753 <https://github.com/pybind/pybind11/pull/753>`_.
Wenzel Jakoba9730be2017-01-06 14:18:44 +0100845
Wenzel Jakobf8dafe92017-01-04 15:09:49 +0100846v2.0.1 (Jan 4, 2017)
847-----------------------------------------------------
848
849* Fix pointer to reference error in type_caster on MSVC
850 `#583 <https://github.com/pybind/pybind11/pull/583>`_.
851
852* Fixed a segmentation in the test suite due to a typo
853 `cd7eac <https://github.com/pybind/pybind11/commit/cd7eac>`_.
854
Wenzel Jakobe33ef9c2017-01-01 13:55:06 +0100855v2.0.0 (Jan 1, 2017)
Wenzel Jakobed52f462016-12-26 13:18:26 +0100856-----------------------------------------------------
857
858* Fixed a reference counting regression affecting types with custom metaclasses
859 (introduced in v2.0.0-rc1).
860 `#571 <https://github.com/pybind/pybind11/pull/571>`_.
861
862* Quenched a CMake policy warning.
863 `#570 <https://github.com/pybind/pybind11/pull/570>`_.
864
Wenzel Jakobe33ef9c2017-01-01 13:55:06 +0100865v2.0.0-rc1 (Dec 23, 2016)
Wenzel Jakobf88af0c2016-06-22 13:52:31 +0200866-----------------------------------------------------
Wenzel Jakob1cbe7ef2016-06-14 14:55:10 +0200867
Wenzel Jakobd3549d62016-12-23 16:01:04 +0100868The pybind11 developers are excited to issue a release candidate of pybind11
869with a subsequent v2.0.0 release planned in early January next year.
Wenzel Jakob1cbe7ef2016-06-14 14:55:10 +0200870
Wenzel Jakobd3549d62016-12-23 16:01:04 +0100871An incredible amount of effort by went into pybind11 over the last ~5 months,
872leading to a release that is jam-packed with exciting new features and numerous
Wenzel Jakobf8dafe92017-01-04 15:09:49 +0100873usability improvements. The following list links PRs or individual commits
Wenzel Jakobed52f462016-12-26 13:18:26 +0100874whenever applicable.
Wenzel Jakobd3549d62016-12-23 16:01:04 +0100875
876Happy Christmas!
877
878* Support for binding C++ class hierarchies that make use of multiple
879 inheritance. `#410 <https://github.com/pybind/pybind11/pull/410>`_.
880
881* PyPy support: pybind11 now supports nightly builds of PyPy and will
882 interoperate with the future 5.7 release. No code changes are necessary,
883 everything "just" works as usual. Note that we only target the Python 2.7
884 branch for now; support for 3.x will be added once its ``cpyext`` extension
Wenzel Jakobed52f462016-12-26 13:18:26 +0100885 support catches up. A few minor features remain unsupported for the time
886 being (notably dynamic attributes in custom types).
887 `#527 <https://github.com/pybind/pybind11/pull/527>`_.
Wenzel Jakobd3549d62016-12-23 16:01:04 +0100888
luzpaz4b874612018-05-06 13:54:10 +0000889* Significant work on the documentation -- in particular, the monolithic
Wenzel Jakobd3549d62016-12-23 16:01:04 +0100890 ``advanced.rst`` file was restructured into a easier to read hierarchical
891 organization. `#448 <https://github.com/pybind/pybind11/pull/448>`_.
892
893* Many NumPy-related improvements:
894
895 1. Object-oriented API to access and modify NumPy ``ndarray`` instances,
896 replicating much of the corresponding NumPy C API functionality.
897 `#402 <https://github.com/pybind/pybind11/pull/402>`_.
898
899 2. NumPy array ``dtype`` array descriptors are now first-class citizens and
900 are exposed via a new class ``py::dtype``.
901
902 3. Structured dtypes can be registered using the ``PYBIND11_NUMPY_DTYPE()``
903 macro. Special ``array`` constructors accepting dtype objects were also
904 added.
905
906 One potential caveat involving this change: format descriptor strings
907 should now be accessed via ``format_descriptor::format()`` (however, for
908 compatibility purposes, the old syntax ``format_descriptor::value`` will
909 still work for non-structured data types). `#308
910 <https://github.com/pybind/pybind11/pull/308>`_.
911
912 4. Further improvements to support structured dtypes throughout the system.
913 `#472 <https://github.com/pybind/pybind11/pull/472>`_,
914 `#474 <https://github.com/pybind/pybind11/pull/474>`_,
915 `#459 <https://github.com/pybind/pybind11/pull/459>`_,
916 `#453 <https://github.com/pybind/pybind11/pull/453>`_,
917 `#452 <https://github.com/pybind/pybind11/pull/452>`_, and
918 `#505 <https://github.com/pybind/pybind11/pull/505>`_.
919
920 5. Fast access operators. `#497 <https://github.com/pybind/pybind11/pull/497>`_.
921
922 6. Constructors for arrays whose storage is owned by another object.
923 `#440 <https://github.com/pybind/pybind11/pull/440>`_.
924
925 7. Added constructors for ``array`` and ``array_t`` explicitly accepting shape
926 and strides; if strides are not provided, they are deduced assuming
927 C-contiguity. Also added simplified constructors for 1-dimensional case.
928
929 8. Added buffer/NumPy support for ``char[N]`` and ``std::array<char, N>`` types.
930
931 9. Added ``memoryview`` wrapper type which is constructible from ``buffer_info``.
932
933* Eigen: many additional conversions and support for non-contiguous
934 arrays/slices.
935 `#427 <https://github.com/pybind/pybind11/pull/427>`_,
936 `#315 <https://github.com/pybind/pybind11/pull/315>`_,
937 `#316 <https://github.com/pybind/pybind11/pull/316>`_,
938 `#312 <https://github.com/pybind/pybind11/pull/312>`_, and
939 `#267 <https://github.com/pybind/pybind11/pull/267>`_
940
941* Incompatible changes in ``class_<...>::class_()``:
942
943 1. Declarations of types that provide access via the buffer protocol must
944 now include the ``py::buffer_protocol()`` annotation as an argument to
945 the ``class_`` constructor.
946
947 2. Declarations of types that require a custom metaclass (i.e. all classes
948 which include static properties via commands such as
949 ``def_readwrite_static()``) must now include the ``py::metaclass()``
950 annotation as an argument to the ``class_`` constructor.
951
952 These two changes were necessary to make type definitions in pybind11
953 future-proof, and to support PyPy via its cpyext mechanism. `#527
954 <https://github.com/pybind/pybind11/pull/527>`_.
955
956
luzpaz4b874612018-05-06 13:54:10 +0000957 3. This version of pybind11 uses a redesigned mechanism for instantiating
958 trampoline classes that are used to override virtual methods from within
Wenzel Jakobd3549d62016-12-23 16:01:04 +0100959 Python. This led to the following user-visible syntax change: instead of
960
961 .. code-block:: cpp
962
963 py::class_<TrampolineClass>("MyClass")
964 .alias<MyClass>()
965 ....
966
967 write
968
969 .. code-block:: cpp
970
971 py::class_<MyClass, TrampolineClass>("MyClass")
972 ....
973
974 Importantly, both the original and the trampoline class are now
975 specified as an arguments (in arbitrary order) to the ``py::class_``
976 template, and the ``alias<..>()`` call is gone. The new scheme has zero
977 overhead in cases when Python doesn't override any functions of the
978 underlying C++ class. `rev. 86d825
979 <https://github.com/pybind/pybind11/commit/86d825>`_.
980
Wenzel Jakobe6b2f752016-07-10 10:54:46 +0200981* Added ``eval`` and ``eval_file`` functions for evaluating expressions and
Wenzel Jakobd3549d62016-12-23 16:01:04 +0100982 statements from a string or file. `rev. 0d3fc3
983 <https://github.com/pybind/pybind11/commit/0d3fc3>`_.
984
985* pybind11 can now create types with a modifiable dictionary.
986 `#437 <https://github.com/pybind/pybind11/pull/437>`_ and
987 `#444 <https://github.com/pybind/pybind11/pull/444>`_.
988
989* Support for translation of arbitrary C++ exceptions to Python counterparts.
990 `#296 <https://github.com/pybind/pybind11/pull/296>`_ and
991 `#273 <https://github.com/pybind/pybind11/pull/273>`_.
992
993* Report full backtraces through mixed C++/Python code, better reporting for
994 import errors, fixed GIL management in exception processing.
995 `#537 <https://github.com/pybind/pybind11/pull/537>`_,
996 `#494 <https://github.com/pybind/pybind11/pull/494>`_,
997 `rev. e72d95 <https://github.com/pybind/pybind11/commit/e72d95>`_, and
998 `rev. 099d6e <https://github.com/pybind/pybind11/commit/099d6e>`_.
999
1000* Support for bit-level operations, comparisons, and serialization of C++
1001 enumerations. `#503 <https://github.com/pybind/pybind11/pull/503>`_,
1002 `#508 <https://github.com/pybind/pybind11/pull/508>`_,
1003 `#380 <https://github.com/pybind/pybind11/pull/380>`_,
1004 `#309 <https://github.com/pybind/pybind11/pull/309>`_.
1005 `#311 <https://github.com/pybind/pybind11/pull/311>`_.
1006
1007* The ``class_`` constructor now accepts its template arguments in any order.
1008 `#385 <https://github.com/pybind/pybind11/pull/385>`_.
1009
1010* Attribute and item accessors now have a more complete interface which makes
1011 it possible to chain attributes as in
1012 ``obj.attr("a")[key].attr("b").attr("method")(1, 2, 3)``. `#425
1013 <https://github.com/pybind/pybind11/pull/425>`_.
1014
1015* Major redesign of the default and conversion constructors in ``pytypes.h``.
1016 `#464 <https://github.com/pybind/pybind11/pull/464>`_.
1017
1018* Added built-in support for ``std::shared_ptr`` holder type. It is no longer
1019 necessary to to include a declaration of the form
1020 ``PYBIND11_DECLARE_HOLDER_TYPE(T, std::shared_ptr<T>)`` (though continuing to
1021 do so won't cause an error).
1022 `#454 <https://github.com/pybind/pybind11/pull/454>`_.
1023
1024* New ``py::overload_cast`` casting operator to select among multiple possible
1025 overloads of a function. An example:
1026
1027 .. code-block:: cpp
1028
1029 py::class_<Pet>(m, "Pet")
1030 .def("set", py::overload_cast<int>(&Pet::set), "Set the pet's age")
1031 .def("set", py::overload_cast<const std::string &>(&Pet::set), "Set the pet's name");
1032
1033 This feature only works on C++14-capable compilers.
1034 `#541 <https://github.com/pybind/pybind11/pull/541>`_.
1035
1036* C++ types are automatically cast to Python types, e.g. when assigning
1037 them as an attribute. For instance, the following is now legal:
1038
1039 .. code-block:: cpp
1040
1041 py::module m = /* ... */
1042 m.attr("constant") = 123;
1043
1044 (Previously, a ``py::cast`` call was necessary to avoid a compilation error.)
1045 `#551 <https://github.com/pybind/pybind11/pull/551>`_.
1046
1047* Redesigned ``pytest``-based test suite. `#321 <https://github.com/pybind/pybind11/pull/321>`_.
1048
1049* Instance tracking to detect reference leaks in test suite. `#324 <https://github.com/pybind/pybind11/pull/324>`_
1050
1051* pybind11 can now distinguish between multiple different instances that are
1052 located at the same memory address, but which have different types.
1053 `#329 <https://github.com/pybind/pybind11/pull/329>`_.
1054
1055* Improved logic in ``move`` return value policy.
1056 `#510 <https://github.com/pybind/pybind11/pull/510>`_,
1057 `#297 <https://github.com/pybind/pybind11/pull/297>`_.
1058
1059* Generalized unpacking API to permit calling Python functions from C++ using
1060 notation such as ``foo(a1, a2, *args, "ka"_a=1, "kb"_a=2, **kwargs)``. `#372 <https://github.com/pybind/pybind11/pull/372>`_.
1061
1062* ``py::print()`` function whose behavior matches that of the native Python
1063 ``print()`` function. `#372 <https://github.com/pybind/pybind11/pull/372>`_.
1064
1065* Added ``py::dict`` keyword constructor:``auto d = dict("number"_a=42,
1066 "name"_a="World");``. `#372 <https://github.com/pybind/pybind11/pull/372>`_.
1067
1068* Added ``py::str::format()`` method and ``_s`` literal: ``py::str s = "1 + 2
1069 = {}"_s.format(3);``. `#372 <https://github.com/pybind/pybind11/pull/372>`_.
1070
1071* Added ``py::repr()`` function which is equivalent to Python's builtin
1072 ``repr()``. `#333 <https://github.com/pybind/pybind11/pull/333>`_.
1073
1074* Improved construction and destruction logic for holder types. It is now
1075 possible to reference instances with smart pointer holder types without
1076 constructing the holder if desired. The ``PYBIND11_DECLARE_HOLDER_TYPE``
1077 macro now accepts an optional second parameter to indicate whether the holder
1078 type uses intrusive reference counting.
1079 `#533 <https://github.com/pybind/pybind11/pull/533>`_ and
1080 `#561 <https://github.com/pybind/pybind11/pull/561>`_.
1081
1082* Mapping a stateless C++ function to Python and back is now "for free" (i.e.
1083 no extra indirections or argument conversion overheads). `rev. 954b79
1084 <https://github.com/pybind/pybind11/commit/954b79>`_.
1085
1086* Bindings for ``std::valarray<T>``.
1087 `#545 <https://github.com/pybind/pybind11/pull/545>`_.
1088
1089* Improved support for C++17 capable compilers.
1090 `#562 <https://github.com/pybind/pybind11/pull/562>`_.
1091
1092* Bindings for ``std::optional<t>``.
1093 `#475 <https://github.com/pybind/pybind11/pull/475>`_,
1094 `#476 <https://github.com/pybind/pybind11/pull/476>`_,
1095 `#479 <https://github.com/pybind/pybind11/pull/479>`_,
1096 `#499 <https://github.com/pybind/pybind11/pull/499>`_, and
1097 `#501 <https://github.com/pybind/pybind11/pull/501>`_.
1098
1099* ``stl_bind.h``: general improvements and support for ``std::map`` and
1100 ``std::unordered_map``.
1101 `#490 <https://github.com/pybind/pybind11/pull/490>`_,
1102 `#282 <https://github.com/pybind/pybind11/pull/282>`_,
1103 `#235 <https://github.com/pybind/pybind11/pull/235>`_.
1104
1105* The ``std::tuple``, ``std::pair``, ``std::list``, and ``std::vector`` type
1106 casters now accept any Python sequence type as input. `rev. 107285
1107 <https://github.com/pybind/pybind11/commit/107285>`_.
1108
1109* Improved CMake Python detection on multi-architecture Linux.
1110 `#532 <https://github.com/pybind/pybind11/pull/532>`_.
1111
1112* Infrastructure to selectively disable or enable parts of the automatically
1113 generated docstrings. `#486 <https://github.com/pybind/pybind11/pull/486>`_.
1114
1115* ``reference`` and ``reference_internal`` are now the default return value
1116 properties for static and non-static properties, respectively. `#473
1117 <https://github.com/pybind/pybind11/pull/473>`_. (the previous defaults
1118 were ``automatic``). `#473 <https://github.com/pybind/pybind11/pull/473>`_.
1119
1120* Support for ``std::unique_ptr`` with non-default deleters or no deleter at
1121 all (``py::nodelete``). `#384 <https://github.com/pybind/pybind11/pull/384>`_.
1122
Wenzel Jakob3c796712016-12-23 16:19:36 +01001123* Deprecated ``handle::call()`` method. The new syntax to call Python
1124 functions is simply ``handle()``. It can also be invoked explicitly via
Wenzel Jakobd3549d62016-12-23 16:01:04 +01001125 ``handle::operator<X>()``, where ``X`` is an optional return value policy.
1126
1127* Print more informative error messages when ``make_tuple()`` or ``cast()``
1128 fail. `#262 <https://github.com/pybind/pybind11/pull/262>`_.
1129
1130* Creation of holder types for classes deriving from
1131 ``std::enable_shared_from_this<>`` now also works for ``const`` values.
1132 `#260 <https://github.com/pybind/pybind11/pull/260>`_.
1133
1134* ``make_iterator()`` improvements for better compatibility with various
1135 types (now uses prefix increment operator); it now also accepts iterators
1136 with different begin/end types as long as they are equality comparable.
1137 `#247 <https://github.com/pybind/pybind11/pull/247>`_.
1138
1139* ``arg()`` now accepts a wider range of argument types for default values.
1140 `#244 <https://github.com/pybind/pybind11/pull/244>`_.
1141
1142* Support ``keep_alive`` where the nurse object may be ``None``. `#341
1143 <https://github.com/pybind/pybind11/pull/341>`_.
1144
1145* Added constructors for ``str`` and ``bytes`` from zero-terminated char
1146 pointers, and from char pointers and length. Added constructors for ``str``
1147 from ``bytes`` and for ``bytes`` from ``str``, which will perform UTF-8
1148 decoding/encoding as required.
1149
1150* Many other improvements of library internals without user-visible changes
1151
Wenzel Jakoba720a602016-07-12 18:02:13 +02001152
11531.8.1 (July 12, 2016)
1154----------------------
Wenzel Jakobc47d4982016-07-11 23:40:28 +02001155* Fixed a rare but potentially very severe issue when the garbage collector ran
1156 during pybind11 type creation.
Wenzel Jakob1cbe7ef2016-06-14 14:55:10 +02001157
Wenzel Jakobf9502152016-06-14 15:00:46 +020011581.8.0 (June 14, 2016)
Wenzel Jakob1cbe7ef2016-06-14 14:55:10 +02001159----------------------
1160* Redesigned CMake build system which exports a convenient
1161 ``pybind11_add_module`` function to parent projects.
1162* ``std::vector<>`` type bindings analogous to Boost.Python's ``indexing_suite``
1163* Transparent conversion of sparse and dense Eigen matrices and vectors (``eigen.h``)
1164* Added an ``ExtraFlags`` template argument to the NumPy ``array_t<>`` wrapper
1165 to disable an enforced cast that may lose precision, e.g. to create overloads
1166 for different precisions and complex vs real-valued matrices.
Wenzel Jakob3f200fa2016-05-17 15:35:29 +02001167* Prevent implicit conversion of floating point values to integral types in
1168 function arguments
Wenzel Jakob163ac2e2016-05-03 14:16:18 +02001169* Fixed incorrect default return value policy for functions returning a shared
1170 pointer
Wenzel Jakob38d8b8c2016-05-31 09:53:28 +02001171* Don't allow registering a type via ``class_`` twice
Wenzel Jakob163ac2e2016-05-03 14:16:18 +02001172* Don't allow casting a ``None`` value into a C++ lvalue reference
1173* Fixed a crash in ``enum_::operator==`` that was triggered by the ``help()`` command
1174* Improved detection of whether or not custom C++ types can be copy/move-constructed
1175* Extended ``str`` type to also work with ``bytes`` instances
Wenzel Jakob1cbe7ef2016-06-14 14:55:10 +02001176* Added a ``"name"_a`` user defined string literal that is equivalent to ``py::arg("name")``.
1177* When specifying function arguments via ``py::arg``, the test that verifies
1178 the number of arguments now runs at compile time.
Wenzel Jakob163ac2e2016-05-03 14:16:18 +02001179* Added ``[[noreturn]]`` attribute to ``pybind11_fail()`` to quench some
1180 compiler warnings
Wenzel Jakob86d825f2016-05-26 13:19:27 +02001181* List function arguments in exception text when the dispatch code cannot find
1182 a matching overload
Wenzel Jakob1cbe7ef2016-06-14 14:55:10 +02001183* Added ``PYBIND11_OVERLOAD_NAME`` and ``PYBIND11_OVERLOAD_PURE_NAME`` macros which
Wenzel Jakobf9502152016-06-14 15:00:46 +02001184 can be used to override virtual methods whose name differs in C++ and Python
Wenzel Jakob1cbe7ef2016-06-14 14:55:10 +02001185 (e.g. ``__call__`` and ``operator()``)
Wenzel Jakob163ac2e2016-05-03 14:16:18 +02001186* Various minor ``iterator`` and ``make_iterator()`` improvements
Wenzel Jakob86d825f2016-05-26 13:19:27 +02001187* Transparently support ``__bool__`` on Python 2.x and Python 3.x
1188* Fixed issue with destructor of unpickled object not being called
Wenzel Jakob163ac2e2016-05-03 14:16:18 +02001189* Minor CMake build system improvements on Windows
Wenzel Jakob86d825f2016-05-26 13:19:27 +02001190* New ``pybind11::args`` and ``pybind11::kwargs`` types to create functions which
1191 take an arbitrary number of arguments and keyword arguments
1192* New syntax to call a Python function from C++ using ``*args`` and ``*kwargs``
Wenzel Jakob1cbe7ef2016-06-14 14:55:10 +02001193* The functions ``def_property_*`` now correctly process docstring arguments (these
1194 formerly caused a segmentation fault)
1195* Many ``mkdoc.py`` improvements (enumerations, template arguments, ``DOC()``
1196 macro accepts more arguments)
1197* Cygwin support
1198* Documentation improvements (pickling support, ``keep_alive``, macro usage)
Wenzel Jakobc4d7ccd2016-04-30 22:00:44 +02001199
Wenzel Jakobe70b2ab2016-04-30 19:58:33 +020012001.7 (April 30, 2016)
Wenzel Jakobbb79d7b2016-04-21 12:23:20 +02001201----------------------
Wenzel Jakob1ac22e32016-04-25 23:25:40 +02001202* Added a new ``move`` return value policy that triggers C++11 move semantics.
Wenzel Jakobdd7ec342016-04-29 10:06:24 +02001203 The automatic return value policy falls back to this case whenever a rvalue
Wenzel Jakob1ac22e32016-04-25 23:25:40 +02001204 reference is encountered
Wenzel Jakobe84f5572016-04-26 23:19:19 +02001205* Significantly more general GIL state routines that are used instead of
1206 Python's troublesome ``PyGILState_Ensure`` and ``PyGILState_Release`` API
Wenzel Jakobdd7ec342016-04-29 10:06:24 +02001207* Redesign of opaque types that drastically simplifies their usage
Wenzel Jakobe70b2ab2016-04-30 19:58:33 +02001208* Extended ability to pass values of type ``[const] void *``
Wenzel Jakob1ac22e32016-04-25 23:25:40 +02001209* ``keep_alive`` fix: don't fail when there is no patient
Wenzel Jakobdd7ec342016-04-29 10:06:24 +02001210* ``functional.h``: acquire the GIL before calling a Python function
Wenzel Jakob1ac22e32016-04-25 23:25:40 +02001211* Added Python RAII type wrappers ``none`` and ``iterable``
1212* Added ``*args`` and ``*kwargs`` pass-through parameters to
1213 ``pybind11.get_include()`` function
Wenzel Jakobdd7ec342016-04-29 10:06:24 +02001214* Iterator improvements and fixes
1215* Documentation on return value policies and opaque types improved
Wenzel Jakobbb79d7b2016-04-21 12:23:20 +02001216
Wenzel Jakobe70b2ab2016-04-30 19:58:33 +020012171.6 (April 30, 2016)
1218----------------------
1219* Skipped due to upload to PyPI gone wrong and inability to recover
1220 (https://github.com/pypa/packaging-problems/issues/74)
1221
Wenzel Jakobbb79d7b2016-04-21 12:23:20 +020012221.5 (April 21, 2016)
Wenzel Jakob2c5d5602016-04-11 18:46:11 +02001223----------------------
Wenzel Jakobc79dbe42016-04-17 21:54:31 +02001224* For polymorphic types, use RTTI to try to return the closest type registered with pybind11
Wenzel Jakobd7efa4f2016-04-13 13:45:09 +02001225* Pickling support for serializing and unserializing C++ instances to a byte stream in Python
Wenzel Jakobb2825952016-04-13 23:33:00 +02001226* Added a convenience routine ``make_iterator()`` which turns a range indicated
1227 by a pair of C++ iterators into a iterable Python object
1228* Added ``len()`` and a variadic ``make_tuple()`` function
Wenzel Jakobb2b44a92016-04-15 17:50:40 +02001229* Addressed a rare issue that could confuse the current virtual function
1230 dispatcher and another that could lead to crashes in multi-threaded
1231 applications
Wenzel Jakobb2825952016-04-13 23:33:00 +02001232* Added a ``get_include()`` function to the Python module that returns the path
1233 of the directory containing the installed pybind11 header files
Wenzel Jakob1c329aa2016-04-13 02:37:36 +02001234* Documentation improvements: import issues, symbol visibility, pickling, limitations
Wenzel Jakobdbe43ff2016-04-21 12:21:14 +02001235* Added casting support for ``std::reference_wrapper<>``
Wenzel Jakob2c5d5602016-04-11 18:46:11 +02001236
Wenzel Jakob33c2a042016-04-07 09:06:49 +020012371.4 (April 7, 2016)
Wenzel Jakobd2385e82016-03-08 18:04:43 +01001238--------------------------
Wenzel Jakob81dfd2c2016-03-08 19:40:32 +01001239* Transparent type conversion for ``std::wstring`` and ``wchar_t``
Wenzel Jakob0e6ca592016-04-07 08:49:37 +02001240* Allow passing ``nullptr``-valued strings
Wenzel Jakob34116732016-04-06 17:55:41 +02001241* Transparent passing of ``void *`` pointers using capsules
Wenzel Jakob0e6ca592016-04-07 08:49:37 +02001242* Transparent support for returning values wrapped in ``std::unique_ptr<>``
Wenzel Jakob4e455dd2016-03-09 16:38:28 +01001243* Improved docstring generation for compatibility with Sphinx
Wenzel Jakob34116732016-04-06 17:55:41 +02001244* Nicer debug error message when default parameter construction fails
1245* Support for "opaque" types that bypass the transparent conversion layer for STL containers
1246* Redesigned type casting interface to avoid ambiguities that could occasionally cause compiler errors
Wenzel Jakob2c5d5602016-04-11 18:46:11 +02001247* Redesigned property implementation; fixes crashes due to an unfortunate default return value policy
Wenzel Jakob4e455dd2016-03-09 16:38:28 +01001248* Anaconda package generation support
Wenzel Jakobd2385e82016-03-08 18:04:43 +01001249
12501.3 (March 8, 2016)
Wenzel Jakob8ed28082016-02-07 17:32:37 +01001251--------------------------
Wenzel Jakobcf2b87a2016-02-22 17:32:44 +01001252
1253* Added support for the Intel C++ compiler (v15+)
1254* Added support for the STL unordered set/map data structures
Wenzel Jakobd2385e82016-03-08 18:04:43 +01001255* Added support for the STL linked list data structure
Wenzel Jakobcf2b87a2016-02-22 17:32:44 +01001256* NumPy-style broadcasting support in ``pybind11::vectorize``
Wenzel Jakob2c5d5602016-04-11 18:46:11 +02001257* pybind11 now displays more verbose error messages when ``arg::operator=()`` fails
Wenzel Jakobd2385e82016-03-08 18:04:43 +01001258* pybind11 internal data structures now live in a version-dependent namespace to avoid ABI issues
1259* Many, many bugfixes involving corner cases and advanced usage
Wenzel Jakob8ed28082016-02-07 17:32:37 +01001260
12611.2 (February 7, 2016)
Wenzel Jakob1ae77fe2016-01-17 22:36:43 +01001262--------------------------
Wenzel Jakob48548ea2016-01-17 22:36:44 +01001263
Wenzel Jakob1ae77fe2016-01-17 22:36:43 +01001264* Optional: efficient generation of function signatures at compile time using C++14
Wenzel Jakob48548ea2016-01-17 22:36:44 +01001265* Switched to a simpler and more general way of dealing with function default
1266 arguments. Unused keyword arguments in function calls are now detected and
1267 cause errors as expected
Wenzel Jakob1ae77fe2016-01-17 22:36:43 +01001268* New ``keep_alive`` call policy analogous to Boost.Python's ``with_custodian_and_ward``
Wenzel Jakob48548ea2016-01-17 22:36:44 +01001269* New ``pybind11::base<>`` attribute to indicate a subclass relationship
Wenzel Jakob1ae77fe2016-01-17 22:36:43 +01001270* Improved interface for RAII type wrappers in ``pytypes.h``
1271* Use RAII type wrappers consistently within pybind11 itself. This
1272 fixes various potential refcount leaks when exceptions occur
Wenzel Jakob2c5d5602016-04-11 18:46:11 +02001273* Added new ``bytes`` RAII type wrapper (maps to ``string`` in Python 2.7)
Wenzel Jakob48548ea2016-01-17 22:36:44 +01001274* Made handle and related RAII classes const correct, using them more
1275 consistently everywhere now
Wenzel Jakob1ae77fe2016-01-17 22:36:43 +01001276* Got rid of the ugly ``__pybind11__`` attributes on the Python side---they are
1277 now stored in a C++ hash table that is not visible in Python
1278* Fixed refcount leaks involving NumPy arrays and bound functions
1279* Vastly improved handling of shared/smart pointers
1280* Removed an unnecessary copy operation in ``pybind11::vectorize``
1281* Fixed naming clashes when both pybind11 and NumPy headers are included
1282* Added conversions for additional exception types
Wenzel Jakob48548ea2016-01-17 22:36:44 +01001283* Documentation improvements (using multiple extension modules, smart pointers,
1284 other minor clarifications)
Wenzel Jakob61587162016-01-18 22:38:52 +01001285* unified infrastructure for parsing variadic arguments in ``class_`` and cpp_function
Wenzel Jakob1ae77fe2016-01-17 22:36:43 +01001286* Fixed license text (was: ZLIB, should have been: 3-clause BSD)
1287* Python 3.2 compatibility
Wenzel Jakobcd4e6ae2016-01-29 11:48:40 +01001288* Fixed remaining issues when accessing types in another plugin module
1289* Added enum comparison and casting methods
1290* Improved SFINAE-based detection of whether types are copy-constructible
1291* Eliminated many warnings about unused variables and the use of ``offsetof()``
Wenzel Jakob8ed28082016-02-07 17:32:37 +01001292* Support for ``std::array<>`` conversions
Wenzel Jakob1ae77fe2016-01-17 22:36:43 +01001293
12941.1 (December 7, 2015)
1295--------------------------
1296
1297* Documentation improvements (GIL, wrapping functions, casting, fixed many typos)
1298* Generalized conversion of integer types
1299* Improved support for casting function objects
1300* Improved support for ``std::shared_ptr<>`` conversions
1301* Initial support for ``std::set<>`` conversions
1302* Fixed type resolution issue for types defined in a separate plugin module
1303* Cmake build system improvements
1304* Factored out generic functionality to non-templated code (smaller code size)
1305* Added a code size / compile time benchmark vs Boost.Python
1306* Added an appveyor CI script
1307
13081.0 (October 15, 2015)
1309------------------------
1310* Initial release