blob: 2397056eb5c7ad049dce6767f9171089e952e266 [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
Wenzel Jakob8cf091a2017-08-31 14:01:08 +02009v2.3.0 (Not yet released)
10-----------------------------------------------------
11
Dean Moldovan56613942017-07-02 12:52:00 +020012* Significantly reduced module binary size (10-20%) when compiled in C++11 mode
13 with GCC/Clang, or in any mode with MSVC. Function signatures are now always
14 precomputed at compile time (this was previously only available in C++14 mode
15 for non-MSVC compilers).
16 `#934 <https://github.com/pybind/pybind11/pull/934>`_.
Wenzel Jakob8cf091a2017-08-31 14:01:08 +020017
Ted Drain0a0758c2017-11-07 08:35:27 -080018* Added support for write only properties.
19 `#1144 <https://github.com/pybind/pybind11/pull/1144>`_.
20
Wenzel Jakob6d190362017-11-16 22:24:36 +010021* The ``value()`` method of ``py::enum_`` now accepts an optional docstring
22 that will be shown in the documentation of the associated enumeration.
23
Wenzel Jakob2d0507d2018-02-07 11:05:41 +010024v2.2.2 (February 7, 2018)
25-----------------------------------------------------
26
27* Fixed a segfault when combining embedded interpreter
28 shutdown/reinitialization with external loaded pybind11 modules.
29 `#1092 <https://github.com/pybind/pybind11/pull/1092>`_.
30
31* Eigen support: fixed a bug where Nx1/1xN numpy inputs couldn't be passed as
32 arguments to Eigen vectors (which for Eigen are simply compile-time fixed
33 Nx1/1xN matrices).
34 `#1106 <https://github.com/pybind/pybind11/pull/1106>`_.
35
36* Clarified to license by moving the licensing of contributions from
37 ``LICENSE`` into ``CONTRIBUTING.md``: the licensing of contributions is not
38 actually part of the software license as distributed. This isn't meant to be
39 a substantial change in the licensing of the project, but addresses concerns
40 that the clause made the license non-standard.
41 `#1109 <https://github.com/pybind/pybind11/issues/1109>`_.
42
43* Fixed a regression introduced in 2.1 that broke binding functions with lvalue
44 character literal arguments.
45 `#1128 <https://github.com/pybind/pybind11/pull/1128>`_.
46
47* MSVC: fix for compilation failures under /permissive-, and added the flag to
48 the appveyor test suite.
49 `#1155 <https://github.com/pybind/pybind11/pull/1155>`_.
50
51* Fixed ``__qualname__`` generation, and in turn, fixes how class names
52 (especially nested class names) are shown in generated docstrings.
53 `#1171 <https://github.com/pybind/pybind11/pull/1171>`_.
54
55* Updated the FAQ with a suggested project citation reference.
56 `#1189 <https://github.com/pybind/pybind11/pull/1189>`_.
57
58* Added fixes for deprecation warnings when compiled under C++17 with
59 ``-Wdeprecated`` turned on, and add ``-Wdeprecated`` to the test suite
60 compilation flags.
61 `#1191 <https://github.com/pybind/pybind11/pull/1191>`_.
62
63* Fixed outdated PyPI URLs in ``setup.py``.
64 `#1213 <https://github.com/pybind/pybind11/pull/1213>`_.
65
66* Fixed a refcount leak for arguments that end up in a ``py::args`` argument
67 for functions with both fixed positional and ``py::args`` arguments.
68 `#1216 <https://github.com/pybind/pybind11/pull/1216>`_.
69
70* Fixed a potential segfault resulting from possible premature destruction of
71 ``py::args``/``py::kwargs`` arguments with overloaded functions.
72 `#1223 <https://github.com/pybind/pybind11/pull/1223>`_.
73
74* Fixed ``del map[item]`` for a ``stl_bind.h`` bound stl map.
75 `#1229 <https://github.com/pybind/pybind11/pull/1229>`_.
76
77* Fixed a regression from v2.1.x where the aggregate initialization could
78 unintentionally end up at a constructor taking a templated
79 ``std::initializer_list<T>`` argument.
80 `#1249 <https://github.com/pybind/pybind11/pull/1249>`_.
81
82* Fixed an issue where calling a function with a keep_alive policy on the same
83 nurse/patient pair would cause the internal patient storage to needlessly
84 grow (unboundedly, if the nurse is long-lived).
85 `#1251 <https://github.com/pybind/pybind11/issues/1251>`_.
86
87* Various other minor fixes.
88
Wenzel Jakobf94d7592017-09-14 08:49:47 +020089v2.2.1 (September 14, 2017)
Dean Moldovan7939f4b2017-09-04 13:49:19 +020090-----------------------------------------------------
91
Dean Moldovan27680302017-09-13 19:04:25 +020092* Added ``py::module::reload()`` member function for reloading a module.
93 `#1040 <https://github.com/pybind/pybind11/pull/1040>`_.
Dean Moldovanb0a0e4a2017-09-04 21:16:09 +020094
Dean Moldovan953d2422017-09-10 16:53:02 +020095* Fixed a reference leak in the number converter.
96 `#1078 <https://github.com/pybind/pybind11/pull/1078>`_.
97
Dean Moldovan27680302017-09-13 19:04:25 +020098* Fixed compilation with Clang on host GCC < 5 (old libstdc++ which isn't fully
99 C++11 compliant). `#1062 <https://github.com/pybind/pybind11/pull/1062>`_.
100
Dean Moldovan3c4933c2017-09-01 21:42:20 +0200101* Fixed a regression where the automatic ``std::vector<bool>`` caster would
102 fail to compile. The same fix also applies to any container which returns
103 element proxies instead of references.
104 `#1053 <https://github.com/pybind/pybind11/pull/1053>`_.
105
Dean Moldovan7939f4b2017-09-04 13:49:19 +0200106* Fixed a regression where the ``py::keep_alive`` policy could not be applied
107 to constructors. `#1065 <https://github.com/pybind/pybind11/pull/1065>`_.
108
Dean Moldovan7b1de1e2017-09-03 01:31:47 +0200109* Fixed a nullptr dereference when loading a ``py::module_local`` type
110 that's only registered in an external module.
111 `#1058 <https://github.com/pybind/pybind11/pull/1058>`_.
112
Dean Moldovan27680302017-09-13 19:04:25 +0200113* Fixed implicit conversion of accessors to types derived from ``py::object``.
114 `#1076 <https://github.com/pybind/pybind11/pull/1076>`_.
115
116* The ``name`` in ``PYBIND11_MODULE(name, variable)`` can now be a macro.
117 `#1082 <https://github.com/pybind/pybind11/pull/1082>`_.
118
119* Relaxed overly strict ``py::pickle()`` check for matching get and set types.
120 `#1064 <https://github.com/pybind/pybind11/pull/1064>`_.
121
Dean Moldovan2b4477e2017-09-09 20:21:34 +0200122* Conversion errors now try to be more informative when it's likely that
123 a missing header is the cause (e.g. forgetting ``<pybind11/stl.h>``).
124 `#1077 <https://github.com/pybind/pybind11/pull/1077>`_.
125
Wenzel Jakob2a5a5ec2017-08-31 13:58:24 +0200126v2.2.0 (August 31, 2017)
Wenzel Jakobd405b1b2017-03-22 22:20:07 +0100127-----------------------------------------------------
128
Dean Moldovandb46a892017-08-13 22:25:15 +0200129* Support for embedding the Python interpreter. See the
130 :doc:`documentation page </advanced/embedding>` for a
131 full overview of the new features.
132 `#774 <https://github.com/pybind/pybind11/pull/774>`_,
133 `#889 <https://github.com/pybind/pybind11/pull/889>`_,
134 `#892 <https://github.com/pybind/pybind11/pull/892>`_,
135 `#920 <https://github.com/pybind/pybind11/pull/920>`_.
136
137 .. code-block:: cpp
138
139 #include <pybind11/embed.h>
140 namespace py = pybind11;
141
142 int main() {
143 py::scoped_interpreter guard{}; // start the interpreter and keep it alive
144
145 py::print("Hello, World!"); // use the Python API
146 }
147
148* Support for inheriting from multiple C++ bases in Python.
149 `#693 <https://github.com/pybind/pybind11/pull/693>`_.
150
151 .. code-block:: python
152
153 from cpp_module import CppBase1, CppBase2
154
155 class PyDerived(CppBase1, CppBase2):
156 def __init__(self):
157 CppBase1.__init__(self) # C++ bases must be initialized explicitly
158 CppBase2.__init__(self)
159
160* ``PYBIND11_MODULE`` is now the preferred way to create module entry points.
161 ``PYBIND11_PLUGIN`` is deprecated. See :ref:`macros` for details.
162 `#879 <https://github.com/pybind/pybind11/pull/879>`_.
163
164 .. code-block:: cpp
165
166 // new
167 PYBIND11_MODULE(example, m) {
168 m.def("add", [](int a, int b) { return a + b; });
169 }
170
171 // old
172 PYBIND11_PLUGIN(example) {
173 py::module m("example");
174 m.def("add", [](int a, int b) { return a + b; });
175 return m.ptr();
176 }
177
178* pybind11's headers and build system now more strictly enforce hidden symbol
179 visibility for extension modules. This should be seamless for most users,
Dean Moldovan1fb9df62017-08-18 19:26:49 +0200180 but see the :doc:`upgrade` if you use a custom build system.
181 `#995 <https://github.com/pybind/pybind11/pull/995>`_.
Dean Moldovandb46a892017-08-13 22:25:15 +0200182
183* Support for ``py::module_local`` types which allow multiple modules to
184 export the same C++ types without conflicts. This is useful for opaque
185 types like ``std::vector<int>``. ``py::bind_vector`` and ``py::bind_map``
186 now default to ``py::module_local`` if their elements are builtins or
187 local types. See :ref:`module_local` for details.
188 `#949 <https://github.com/pybind/pybind11/pull/949>`_,
189 `#981 <https://github.com/pybind/pybind11/pull/981>`_,
190 `#995 <https://github.com/pybind/pybind11/pull/995>`_,
191 `#997 <https://github.com/pybind/pybind11/pull/997>`_.
192
193* Custom constructors can now be added very easily using lambdas or factory
194 functions which return a class instance by value, pointer or holder. This
195 supersedes the old placement-new ``__init__`` technique.
196 See :ref:`custom_constructors` for details.
Dean Moldovan4c540442017-08-30 21:53:08 +0200197 `#805 <https://github.com/pybind/pybind11/pull/805>`_,
198 `#1014 <https://github.com/pybind/pybind11/pull/1014>`_.
Dean Moldovandb46a892017-08-13 22:25:15 +0200199
200 .. code-block:: cpp
201
202 struct Example {
203 Example(std::string);
204 };
205
206 py::class_<Example>(m, "Example")
207 .def(py::init<std::string>()) // existing constructor
208 .def(py::init([](int n) { // custom constructor
209 return std::make_unique<Example>(std::to_string(n));
210 }));
211
Dean Moldovan1e5a7da2017-08-24 01:53:15 +0200212* Similarly to custom constructors, pickling support functions are now bound
213 using the ``py::pickle()`` adaptor which improves type safety. See the
214 :doc:`upgrade` and :ref:`pickling` for details.
215 `#1038 <https://github.com/pybind/pybind11/pull/1038>`_.
216
Dean Moldovandb46a892017-08-13 22:25:15 +0200217* Builtin support for converting C++17 standard library types and general
218 conversion improvements:
219
220 1. C++17 ``std::variant`` is supported right out of the box. C++11/14
221 equivalents (e.g. ``boost::variant``) can also be added with a simple
222 user-defined specialization. See :ref:`cpp17_container_casters` for details.
223 `#811 <https://github.com/pybind/pybind11/pull/811>`_,
224 `#845 <https://github.com/pybind/pybind11/pull/845>`_,
225 `#989 <https://github.com/pybind/pybind11/pull/989>`_.
226
227 2. Out-of-the-box support for C++17 ``std::string_view``.
228 `#906 <https://github.com/pybind/pybind11/pull/906>`_.
229
230 3. Improved compatibility of the builtin ``optional`` converter.
231 `#874 <https://github.com/pybind/pybind11/pull/874>`_.
232
233 4. The ``bool`` converter now accepts ``numpy.bool_`` and types which
234 define ``__bool__`` (Python 3.x) or ``__nonzero__`` (Python 2.7).
235 `#925 <https://github.com/pybind/pybind11/pull/925>`_.
236
237 5. C++-to-Python casters are now more efficient and move elements out
238 of rvalue containers whenever possible.
239 `#851 <https://github.com/pybind/pybind11/pull/851>`_,
240 `#936 <https://github.com/pybind/pybind11/pull/936>`_,
241 `#938 <https://github.com/pybind/pybind11/pull/938>`_.
242
243 6. Fixed ``bytes`` to ``std::string/char*`` conversion on Python 3.
244 `#817 <https://github.com/pybind/pybind11/pull/817>`_.
245
246 7. Fixed lifetime of temporary C++ objects created in Python-to-C++ conversions.
247 `#924 <https://github.com/pybind/pybind11/pull/924>`_.
248
Henry Schreiner8b405052017-08-24 17:12:43 -0700249* Scope guard call policy for RAII types, e.g. ``py::call_guard<py::gil_scoped_release>()``,
250 ``py::call_guard<py::scoped_ostream_redirect>()``. See :ref:`call_policies` for details.
Dean Moldovandb46a892017-08-13 22:25:15 +0200251 `#740 <https://github.com/pybind/pybind11/pull/740>`_.
252
Henry Schreiner8b405052017-08-24 17:12:43 -0700253* Utility for redirecting C++ streams to Python (e.g. ``std::cout`` ->
254 ``sys.stdout``). Scope guard ``py::scoped_ostream_redirect`` in C++ and
255 a context manager in Python. See :ref:`ostream_redirect`.
256 `#1009 <https://github.com/pybind/pybind11/pull/1009>`_.
257
Dean Moldovandb46a892017-08-13 22:25:15 +0200258* Improved handling of types and exceptions across module boundaries.
259 `#915 <https://github.com/pybind/pybind11/pull/915>`_,
260 `#951 <https://github.com/pybind/pybind11/pull/951>`_,
261 `#995 <https://github.com/pybind/pybind11/pull/995>`_.
262
263* Fixed destruction order of ``py::keep_alive`` nurse/patient objects
264 in reference cycles.
265 `#856 <https://github.com/pybind/pybind11/pull/856>`_.
266
267* Numpy and buffer protocol related improvements:
268
269 1. Support for negative strides in Python buffer objects/numpy arrays. This
270 required changing integers from unsigned to signed for the related C++ APIs.
271 Note: If you have compiler warnings enabled, you may notice some new conversion
272 warnings after upgrading. These can be resolved with ``static_cast``.
273 `#782 <https://github.com/pybind/pybind11/pull/782>`_.
274
275 2. Support ``std::complex`` and arrays inside ``PYBIND11_NUMPY_DTYPE``.
276 `#831 <https://github.com/pybind/pybind11/pull/831>`_,
277 `#832 <https://github.com/pybind/pybind11/pull/832>`_.
278
279 3. Support for constructing ``py::buffer_info`` and ``py::arrays`` using
280 arbitrary containers or iterators instead of requiring a ``std::vector``.
281 `#788 <https://github.com/pybind/pybind11/pull/788>`_,
282 `#822 <https://github.com/pybind/pybind11/pull/822>`_,
283 `#860 <https://github.com/pybind/pybind11/pull/860>`_.
284
285 4. Explicitly check numpy version and require >= 1.7.0.
286 `#819 <https://github.com/pybind/pybind11/pull/819>`_.
287
288* Support for allowing/prohibiting ``None`` for specific arguments and improved
289 ``None`` overload resolution order. See :ref:`none_arguments` for details.
290 `#843 <https://github.com/pybind/pybind11/pull/843>`_.
291 `#859 <https://github.com/pybind/pybind11/pull/859>`_.
292
293* Added ``py::exec()`` as a shortcut for ``py::eval<py::eval_statements>()``
294 and support for C++11 raw string literals as input. See :ref:`eval`.
295 `#766 <https://github.com/pybind/pybind11/pull/766>`_,
296 `#827 <https://github.com/pybind/pybind11/pull/827>`_.
297
298* ``py::vectorize()`` ignores non-vectorizable arguments and supports
299 member functions.
300 `#762 <https://github.com/pybind/pybind11/pull/762>`_.
301
302* Support for bound methods as callbacks (``pybind11/functional.h``).
303 `#815 <https://github.com/pybind/pybind11/pull/815>`_.
304
305* Allow aliasing pybind11 methods: ``cls.attr("foo") = cls.attr("bar")``.
306 `#802 <https://github.com/pybind/pybind11/pull/802>`_.
307
308* Don't allow mixed static/non-static overloads.
309 `#804 <https://github.com/pybind/pybind11/pull/804>`_.
310
311* Fixed overriding static properties in derived classes.
312 `#784 <https://github.com/pybind/pybind11/pull/784>`_.
313
Dean Moldovan4c540442017-08-30 21:53:08 +0200314* Improved deduction of member functions of a derived class when its bases
315 aren't registered with pybind11.
Dean Moldovandb46a892017-08-13 22:25:15 +0200316 `#855 <https://github.com/pybind/pybind11/pull/855>`_.
317
318 .. code-block:: cpp
319
320 struct Base {
321 int foo() { return 42; }
322 }
323
324 struct Derived : Base {}
325
326 // Now works, but previously required also binding `Base`
327 py::class_<Derived>(m, "Derived")
328 .def("foo", &Derived::foo); // function is actually from `Base`
329
Wenzel Jakobb12a9d62017-08-23 16:30:56 +0200330* The implementation of ``py::init<>`` now uses C++11 brace initialization
331 syntax to construct instances, which permits binding implicit constructors of
332 aggregate types. `#1015 <https://github.com/pybind/pybind11/pull/1015>`_.
333
334 .. code-block:: cpp
335
336 struct Aggregate {
337 int a;
338 std::string b;
339 };
340
341 py::class_<Aggregate>(m, "Aggregate")
342 .def(py::init<int, const std::string &>());
343
Dean Moldovandb46a892017-08-13 22:25:15 +0200344* Fixed issues with multiple inheritance with offset base/derived pointers.
345 `#812 <https://github.com/pybind/pybind11/pull/812>`_,
346 `#866 <https://github.com/pybind/pybind11/pull/866>`_,
347 `#960 <https://github.com/pybind/pybind11/pull/960>`_.
348
Dean Moldovan4c540442017-08-30 21:53:08 +0200349* Fixed reference leak of type objects.
350 `#1030 <https://github.com/pybind/pybind11/pull/1030>`_.
351
Dean Moldovandb46a892017-08-13 22:25:15 +0200352* Improved support for the ``/std:c++14`` and ``/std:c++latest`` modes
353 on MSVC 2017.
354 `#841 <https://github.com/pybind/pybind11/pull/841>`_,
355 `#999 <https://github.com/pybind/pybind11/pull/999>`_.
356
357* Fixed detection of private operator new on MSVC.
358 `#893 <https://github.com/pybind/pybind11/pull/893>`_,
359 `#918 <https://github.com/pybind/pybind11/pull/918>`_.
360
361* Intel C++ compiler compatibility fixes.
362 `#937 <https://github.com/pybind/pybind11/pull/937>`_.
363
364* Fixed implicit conversion of `py::enum_` to integer types on Python 2.7.
365 `#821 <https://github.com/pybind/pybind11/pull/821>`_.
366
Bruce Merry37de2da2017-08-30 14:22:00 +0200367* Added ``py::hash`` to fetch the hash value of Python objects, and
368 ``.def(hash(py::self))`` to provide the C++ ``std::hash`` as the Python
369 ``__hash__`` method.
370 `#1034 <https://github.com/pybind/pybind11/pull/1034>`_.
371
Dean Moldovandb46a892017-08-13 22:25:15 +0200372* Fixed ``__truediv__`` on Python 2 and ``__itruediv__`` on Python 3.
373 `#867 <https://github.com/pybind/pybind11/pull/867>`_.
374
375* ``py::capsule`` objects now support the ``name`` attribute. This is useful
376 for interfacing with ``scipy.LowLevelCallable``.
377 `#902 <https://github.com/pybind/pybind11/pull/902>`_.
378
379* Fixed ``py::make_iterator``'s ``__next__()`` for past-the-end calls.
380 `#897 <https://github.com/pybind/pybind11/pull/897>`_.
381
382* Added ``error_already_set::matches()`` for checking Python exceptions.
383 `#772 <https://github.com/pybind/pybind11/pull/772>`_.
384
385* Deprecated ``py::error_already_set::clear()``. It's no longer needed
386 following a simplification of the ``py::error_already_set`` class.
387 `#954 <https://github.com/pybind/pybind11/pull/954>`_.
388
389* Deprecated ``py::handle::operator==()`` in favor of ``py::handle::is()``
390 `#825 <https://github.com/pybind/pybind11/pull/825>`_.
391
392* Deprecated ``py::object::borrowed``/``py::object::stolen``.
393 Use ``py::object::borrowed_t{}``/``py::object::stolen_t{}`` instead.
394 `#771 <https://github.com/pybind/pybind11/pull/771>`_.
395
Dean Moldovan4c540442017-08-30 21:53:08 +0200396* Changed internal data structure versioning to avoid conflicts between
397 modules compiled with different revisions of pybind11.
398 `#1012 <https://github.com/pybind/pybind11/pull/1012>`_.
399
Dean Moldovandb46a892017-08-13 22:25:15 +0200400* Additional compile-time and run-time error checking and more informative messages.
401 `#786 <https://github.com/pybind/pybind11/pull/786>`_,
402 `#794 <https://github.com/pybind/pybind11/pull/794>`_,
403 `#803 <https://github.com/pybind/pybind11/pull/803>`_.
404
405* Various minor improvements and fixes.
406 `#764 <https://github.com/pybind/pybind11/pull/764>`_,
407 `#791 <https://github.com/pybind/pybind11/pull/791>`_,
408 `#795 <https://github.com/pybind/pybind11/pull/795>`_,
409 `#840 <https://github.com/pybind/pybind11/pull/840>`_,
410 `#844 <https://github.com/pybind/pybind11/pull/844>`_,
411 `#846 <https://github.com/pybind/pybind11/pull/846>`_,
412 `#849 <https://github.com/pybind/pybind11/pull/849>`_,
413 `#858 <https://github.com/pybind/pybind11/pull/858>`_,
414 `#862 <https://github.com/pybind/pybind11/pull/862>`_,
415 `#871 <https://github.com/pybind/pybind11/pull/871>`_,
416 `#872 <https://github.com/pybind/pybind11/pull/872>`_,
417 `#881 <https://github.com/pybind/pybind11/pull/881>`_,
418 `#888 <https://github.com/pybind/pybind11/pull/888>`_,
419 `#899 <https://github.com/pybind/pybind11/pull/899>`_,
420 `#928 <https://github.com/pybind/pybind11/pull/928>`_,
421 `#931 <https://github.com/pybind/pybind11/pull/931>`_,
422 `#944 <https://github.com/pybind/pybind11/pull/944>`_,
423 `#950 <https://github.com/pybind/pybind11/pull/950>`_,
424 `#952 <https://github.com/pybind/pybind11/pull/952>`_,
425 `#962 <https://github.com/pybind/pybind11/pull/962>`_,
426 `#965 <https://github.com/pybind/pybind11/pull/965>`_,
427 `#970 <https://github.com/pybind/pybind11/pull/970>`_,
Dean Moldovandb46a892017-08-13 22:25:15 +0200428 `#978 <https://github.com/pybind/pybind11/pull/978>`_,
Dean Moldovan4c540442017-08-30 21:53:08 +0200429 `#979 <https://github.com/pybind/pybind11/pull/979>`_,
Wenzel Jakoba1041192017-08-28 16:35:32 +0200430 `#986 <https://github.com/pybind/pybind11/pull/986>`_,
Dean Moldovan4c540442017-08-30 21:53:08 +0200431 `#1020 <https://github.com/pybind/pybind11/pull/1020>`_,
432 `#1027 <https://github.com/pybind/pybind11/pull/1027>`_,
Wenzel Jakoba1041192017-08-28 16:35:32 +0200433 `#1037 <https://github.com/pybind/pybind11/pull/1037>`_.
Dean Moldovandb46a892017-08-13 22:25:15 +0200434
435* Testing improvements.
436 `#798 <https://github.com/pybind/pybind11/pull/798>`_,
437 `#882 <https://github.com/pybind/pybind11/pull/882>`_,
438 `#898 <https://github.com/pybind/pybind11/pull/898>`_,
439 `#900 <https://github.com/pybind/pybind11/pull/900>`_,
440 `#921 <https://github.com/pybind/pybind11/pull/921>`_,
441 `#923 <https://github.com/pybind/pybind11/pull/923>`_,
442 `#963 <https://github.com/pybind/pybind11/pull/963>`_.
443
Wenzel Jakobdb200952017-04-07 02:03:46 +0200444v2.1.1 (April 7, 2017)
445-----------------------------------------------------
446
447* Fixed minimum version requirement for MSVC 2015u3
448 `#773 <https://github.com/pybind/pybind11/pull/773>`_.
449
Wenzel Jakobd405b1b2017-03-22 22:20:07 +0100450v2.1.0 (March 22, 2017)
Wenzel Jakoba9730be2017-01-06 14:18:44 +0100451-----------------------------------------------------
452
Wenzel Jakob62e5fef2017-03-22 22:07:45 +0100453* pybind11 now performs function overload resolution in two phases. The first
454 phase only considers exact type matches, while the second allows for implicit
455 conversions to take place. A special ``noconvert()`` syntax can be used to
456 completely disable implicit conversions for specific arguments.
457 `#643 <https://github.com/pybind/pybind11/pull/643>`_,
458 `#634 <https://github.com/pybind/pybind11/pull/634>`_,
459 `#650 <https://github.com/pybind/pybind11/pull/650>`_.
460
461* Fixed a regression where static properties no longer worked with classes
462 using multiple inheritance. The ``py::metaclass`` attribute is no longer
463 necessary (and deprecated as of this release) when binding classes with
464 static properties.
465 `#679 <https://github.com/pybind/pybind11/pull/679>`_,
466
467* Classes bound using ``pybind11`` can now use custom metaclasses.
468 `#679 <https://github.com/pybind/pybind11/pull/679>`_,
469
470* ``py::args`` and ``py::kwargs`` can now be mixed with other positional
471 arguments when binding functions using pybind11.
472 `#611 <https://github.com/pybind/pybind11/pull/611>`_.
473
474* Improved support for C++11 unicode string and character types; added
475 extensive documentation regarding pybind11's string conversion behavior.
476 `#624 <https://github.com/pybind/pybind11/pull/624>`_,
477 `#636 <https://github.com/pybind/pybind11/pull/636>`_,
478 `#715 <https://github.com/pybind/pybind11/pull/715>`_.
479
480* pybind11 can now avoid expensive copies when converting Eigen arrays to NumPy
481 arrays (and vice versa). `#610 <https://github.com/pybind/pybind11/pull/610>`_.
482
483* The "fast path" in ``py::vectorize`` now works for any full-size group of C or
484 F-contiguous arrays. The non-fast path is also faster since it no longer performs
485 copies of the input arguments (except when type conversions are necessary).
486 `#610 <https://github.com/pybind/pybind11/pull/610>`_.
487
488* Added fast, unchecked access to NumPy arrays via a proxy object.
489 `#746 <https://github.com/pybind/pybind11/pull/746>`_.
490
Wenzel Jakob0d929382017-03-22 22:52:29 +0100491* Transparent support for class-specific ``operator new`` and
Wenzel Jakob62e5fef2017-03-22 22:07:45 +0100492 ``operator delete`` implementations.
493 `#755 <https://github.com/pybind/pybind11/pull/755>`_.
494
495* Slimmer and more efficient STL-compatible iterator interface for sequence types.
496 `#662 <https://github.com/pybind/pybind11/pull/662>`_.
497
498* Improved custom holder type support.
499 `#607 <https://github.com/pybind/pybind11/pull/607>`_.
500
501* ``nullptr`` to ``None`` conversion fixed in various builtin type casters.
502 `#732 <https://github.com/pybind/pybind11/pull/732>`_.
503
504* ``enum_`` now exposes its members via a special ``__members__`` attribute.
505 `#666 <https://github.com/pybind/pybind11/pull/666>`_.
506
507* ``std::vector`` bindings created using ``stl_bind.h`` can now optionally
508 implement the buffer protocol. `#488 <https://github.com/pybind/pybind11/pull/488>`_.
509
510* Automated C++ reference documentation using doxygen and breathe.
511 `#598 <https://github.com/pybind/pybind11/pull/598>`_.
512
513* Added minimum compiler version assertions.
514 `#727 <https://github.com/pybind/pybind11/pull/727>`_.
515
516* Improved compatibility with C++1z.
517 `#677 <https://github.com/pybind/pybind11/pull/677>`_.
518
519* Improved ``py::capsule`` API. Can be used to implement cleanup
520 callbacks that are involved at module destruction time.
521 `#752 <https://github.com/pybind/pybind11/pull/752>`_.
522
523* Various minor improvements and fixes.
524 `#595 <https://github.com/pybind/pybind11/pull/595>`_,
525 `#588 <https://github.com/pybind/pybind11/pull/588>`_,
526 `#589 <https://github.com/pybind/pybind11/pull/589>`_,
527 `#603 <https://github.com/pybind/pybind11/pull/603>`_,
528 `#619 <https://github.com/pybind/pybind11/pull/619>`_,
529 `#648 <https://github.com/pybind/pybind11/pull/648>`_,
530 `#695 <https://github.com/pybind/pybind11/pull/695>`_,
531 `#720 <https://github.com/pybind/pybind11/pull/720>`_,
532 `#723 <https://github.com/pybind/pybind11/pull/723>`_,
533 `#729 <https://github.com/pybind/pybind11/pull/729>`_,
534 `#724 <https://github.com/pybind/pybind11/pull/724>`_,
535 `#742 <https://github.com/pybind/pybind11/pull/742>`_,
536 `#753 <https://github.com/pybind/pybind11/pull/753>`_.
Wenzel Jakoba9730be2017-01-06 14:18:44 +0100537
Wenzel Jakobf8dafe92017-01-04 15:09:49 +0100538v2.0.1 (Jan 4, 2017)
539-----------------------------------------------------
540
541* Fix pointer to reference error in type_caster on MSVC
542 `#583 <https://github.com/pybind/pybind11/pull/583>`_.
543
544* Fixed a segmentation in the test suite due to a typo
545 `cd7eac <https://github.com/pybind/pybind11/commit/cd7eac>`_.
546
Wenzel Jakobe33ef9c2017-01-01 13:55:06 +0100547v2.0.0 (Jan 1, 2017)
Wenzel Jakobed52f462016-12-26 13:18:26 +0100548-----------------------------------------------------
549
550* Fixed a reference counting regression affecting types with custom metaclasses
551 (introduced in v2.0.0-rc1).
552 `#571 <https://github.com/pybind/pybind11/pull/571>`_.
553
554* Quenched a CMake policy warning.
555 `#570 <https://github.com/pybind/pybind11/pull/570>`_.
556
Wenzel Jakobe33ef9c2017-01-01 13:55:06 +0100557v2.0.0-rc1 (Dec 23, 2016)
Wenzel Jakobf88af0c2016-06-22 13:52:31 +0200558-----------------------------------------------------
Wenzel Jakob1cbe7ef2016-06-14 14:55:10 +0200559
Wenzel Jakobd3549d62016-12-23 16:01:04 +0100560The pybind11 developers are excited to issue a release candidate of pybind11
561with a subsequent v2.0.0 release planned in early January next year.
Wenzel Jakob1cbe7ef2016-06-14 14:55:10 +0200562
Wenzel Jakobd3549d62016-12-23 16:01:04 +0100563An incredible amount of effort by went into pybind11 over the last ~5 months,
564leading to a release that is jam-packed with exciting new features and numerous
Wenzel Jakobf8dafe92017-01-04 15:09:49 +0100565usability improvements. The following list links PRs or individual commits
Wenzel Jakobed52f462016-12-26 13:18:26 +0100566whenever applicable.
Wenzel Jakobd3549d62016-12-23 16:01:04 +0100567
568Happy Christmas!
569
570* Support for binding C++ class hierarchies that make use of multiple
571 inheritance. `#410 <https://github.com/pybind/pybind11/pull/410>`_.
572
573* PyPy support: pybind11 now supports nightly builds of PyPy and will
574 interoperate with the future 5.7 release. No code changes are necessary,
575 everything "just" works as usual. Note that we only target the Python 2.7
576 branch for now; support for 3.x will be added once its ``cpyext`` extension
Wenzel Jakobed52f462016-12-26 13:18:26 +0100577 support catches up. A few minor features remain unsupported for the time
578 being (notably dynamic attributes in custom types).
579 `#527 <https://github.com/pybind/pybind11/pull/527>`_.
Wenzel Jakobd3549d62016-12-23 16:01:04 +0100580
581* Significant work on the documentation -- in particular, the monolitic
582 ``advanced.rst`` file was restructured into a easier to read hierarchical
583 organization. `#448 <https://github.com/pybind/pybind11/pull/448>`_.
584
585* Many NumPy-related improvements:
586
587 1. Object-oriented API to access and modify NumPy ``ndarray`` instances,
588 replicating much of the corresponding NumPy C API functionality.
589 `#402 <https://github.com/pybind/pybind11/pull/402>`_.
590
591 2. NumPy array ``dtype`` array descriptors are now first-class citizens and
592 are exposed via a new class ``py::dtype``.
593
594 3. Structured dtypes can be registered using the ``PYBIND11_NUMPY_DTYPE()``
595 macro. Special ``array`` constructors accepting dtype objects were also
596 added.
597
598 One potential caveat involving this change: format descriptor strings
599 should now be accessed via ``format_descriptor::format()`` (however, for
600 compatibility purposes, the old syntax ``format_descriptor::value`` will
601 still work for non-structured data types). `#308
602 <https://github.com/pybind/pybind11/pull/308>`_.
603
604 4. Further improvements to support structured dtypes throughout the system.
605 `#472 <https://github.com/pybind/pybind11/pull/472>`_,
606 `#474 <https://github.com/pybind/pybind11/pull/474>`_,
607 `#459 <https://github.com/pybind/pybind11/pull/459>`_,
608 `#453 <https://github.com/pybind/pybind11/pull/453>`_,
609 `#452 <https://github.com/pybind/pybind11/pull/452>`_, and
610 `#505 <https://github.com/pybind/pybind11/pull/505>`_.
611
612 5. Fast access operators. `#497 <https://github.com/pybind/pybind11/pull/497>`_.
613
614 6. Constructors for arrays whose storage is owned by another object.
615 `#440 <https://github.com/pybind/pybind11/pull/440>`_.
616
617 7. Added constructors for ``array`` and ``array_t`` explicitly accepting shape
618 and strides; if strides are not provided, they are deduced assuming
619 C-contiguity. Also added simplified constructors for 1-dimensional case.
620
621 8. Added buffer/NumPy support for ``char[N]`` and ``std::array<char, N>`` types.
622
623 9. Added ``memoryview`` wrapper type which is constructible from ``buffer_info``.
624
625* Eigen: many additional conversions and support for non-contiguous
626 arrays/slices.
627 `#427 <https://github.com/pybind/pybind11/pull/427>`_,
628 `#315 <https://github.com/pybind/pybind11/pull/315>`_,
629 `#316 <https://github.com/pybind/pybind11/pull/316>`_,
630 `#312 <https://github.com/pybind/pybind11/pull/312>`_, and
631 `#267 <https://github.com/pybind/pybind11/pull/267>`_
632
633* Incompatible changes in ``class_<...>::class_()``:
634
635 1. Declarations of types that provide access via the buffer protocol must
636 now include the ``py::buffer_protocol()`` annotation as an argument to
637 the ``class_`` constructor.
638
639 2. Declarations of types that require a custom metaclass (i.e. all classes
640 which include static properties via commands such as
641 ``def_readwrite_static()``) must now include the ``py::metaclass()``
642 annotation as an argument to the ``class_`` constructor.
643
644 These two changes were necessary to make type definitions in pybind11
645 future-proof, and to support PyPy via its cpyext mechanism. `#527
646 <https://github.com/pybind/pybind11/pull/527>`_.
647
648
649 3. This version of pybind11 uses a redesigned mechnism for instantiating
650 trempoline classes that are used to override virtual methods from within
651 Python. This led to the following user-visible syntax change: instead of
652
653 .. code-block:: cpp
654
655 py::class_<TrampolineClass>("MyClass")
656 .alias<MyClass>()
657 ....
658
659 write
660
661 .. code-block:: cpp
662
663 py::class_<MyClass, TrampolineClass>("MyClass")
664 ....
665
666 Importantly, both the original and the trampoline class are now
667 specified as an arguments (in arbitrary order) to the ``py::class_``
668 template, and the ``alias<..>()`` call is gone. The new scheme has zero
669 overhead in cases when Python doesn't override any functions of the
670 underlying C++ class. `rev. 86d825
671 <https://github.com/pybind/pybind11/commit/86d825>`_.
672
Wenzel Jakobe6b2f752016-07-10 10:54:46 +0200673* Added ``eval`` and ``eval_file`` functions for evaluating expressions and
Wenzel Jakobd3549d62016-12-23 16:01:04 +0100674 statements from a string or file. `rev. 0d3fc3
675 <https://github.com/pybind/pybind11/commit/0d3fc3>`_.
676
677* pybind11 can now create types with a modifiable dictionary.
678 `#437 <https://github.com/pybind/pybind11/pull/437>`_ and
679 `#444 <https://github.com/pybind/pybind11/pull/444>`_.
680
681* Support for translation of arbitrary C++ exceptions to Python counterparts.
682 `#296 <https://github.com/pybind/pybind11/pull/296>`_ and
683 `#273 <https://github.com/pybind/pybind11/pull/273>`_.
684
685* Report full backtraces through mixed C++/Python code, better reporting for
686 import errors, fixed GIL management in exception processing.
687 `#537 <https://github.com/pybind/pybind11/pull/537>`_,
688 `#494 <https://github.com/pybind/pybind11/pull/494>`_,
689 `rev. e72d95 <https://github.com/pybind/pybind11/commit/e72d95>`_, and
690 `rev. 099d6e <https://github.com/pybind/pybind11/commit/099d6e>`_.
691
692* Support for bit-level operations, comparisons, and serialization of C++
693 enumerations. `#503 <https://github.com/pybind/pybind11/pull/503>`_,
694 `#508 <https://github.com/pybind/pybind11/pull/508>`_,
695 `#380 <https://github.com/pybind/pybind11/pull/380>`_,
696 `#309 <https://github.com/pybind/pybind11/pull/309>`_.
697 `#311 <https://github.com/pybind/pybind11/pull/311>`_.
698
699* The ``class_`` constructor now accepts its template arguments in any order.
700 `#385 <https://github.com/pybind/pybind11/pull/385>`_.
701
702* Attribute and item accessors now have a more complete interface which makes
703 it possible to chain attributes as in
704 ``obj.attr("a")[key].attr("b").attr("method")(1, 2, 3)``. `#425
705 <https://github.com/pybind/pybind11/pull/425>`_.
706
707* Major redesign of the default and conversion constructors in ``pytypes.h``.
708 `#464 <https://github.com/pybind/pybind11/pull/464>`_.
709
710* Added built-in support for ``std::shared_ptr`` holder type. It is no longer
711 necessary to to include a declaration of the form
712 ``PYBIND11_DECLARE_HOLDER_TYPE(T, std::shared_ptr<T>)`` (though continuing to
713 do so won't cause an error).
714 `#454 <https://github.com/pybind/pybind11/pull/454>`_.
715
716* New ``py::overload_cast`` casting operator to select among multiple possible
717 overloads of a function. An example:
718
719 .. code-block:: cpp
720
721 py::class_<Pet>(m, "Pet")
722 .def("set", py::overload_cast<int>(&Pet::set), "Set the pet's age")
723 .def("set", py::overload_cast<const std::string &>(&Pet::set), "Set the pet's name");
724
725 This feature only works on C++14-capable compilers.
726 `#541 <https://github.com/pybind/pybind11/pull/541>`_.
727
728* C++ types are automatically cast to Python types, e.g. when assigning
729 them as an attribute. For instance, the following is now legal:
730
731 .. code-block:: cpp
732
733 py::module m = /* ... */
734 m.attr("constant") = 123;
735
736 (Previously, a ``py::cast`` call was necessary to avoid a compilation error.)
737 `#551 <https://github.com/pybind/pybind11/pull/551>`_.
738
739* Redesigned ``pytest``-based test suite. `#321 <https://github.com/pybind/pybind11/pull/321>`_.
740
741* Instance tracking to detect reference leaks in test suite. `#324 <https://github.com/pybind/pybind11/pull/324>`_
742
743* pybind11 can now distinguish between multiple different instances that are
744 located at the same memory address, but which have different types.
745 `#329 <https://github.com/pybind/pybind11/pull/329>`_.
746
747* Improved logic in ``move`` return value policy.
748 `#510 <https://github.com/pybind/pybind11/pull/510>`_,
749 `#297 <https://github.com/pybind/pybind11/pull/297>`_.
750
751* Generalized unpacking API to permit calling Python functions from C++ using
752 notation such as ``foo(a1, a2, *args, "ka"_a=1, "kb"_a=2, **kwargs)``. `#372 <https://github.com/pybind/pybind11/pull/372>`_.
753
754* ``py::print()`` function whose behavior matches that of the native Python
755 ``print()`` function. `#372 <https://github.com/pybind/pybind11/pull/372>`_.
756
757* Added ``py::dict`` keyword constructor:``auto d = dict("number"_a=42,
758 "name"_a="World");``. `#372 <https://github.com/pybind/pybind11/pull/372>`_.
759
760* Added ``py::str::format()`` method and ``_s`` literal: ``py::str s = "1 + 2
761 = {}"_s.format(3);``. `#372 <https://github.com/pybind/pybind11/pull/372>`_.
762
763* Added ``py::repr()`` function which is equivalent to Python's builtin
764 ``repr()``. `#333 <https://github.com/pybind/pybind11/pull/333>`_.
765
766* Improved construction and destruction logic for holder types. It is now
767 possible to reference instances with smart pointer holder types without
768 constructing the holder if desired. The ``PYBIND11_DECLARE_HOLDER_TYPE``
769 macro now accepts an optional second parameter to indicate whether the holder
770 type uses intrusive reference counting.
771 `#533 <https://github.com/pybind/pybind11/pull/533>`_ and
772 `#561 <https://github.com/pybind/pybind11/pull/561>`_.
773
774* Mapping a stateless C++ function to Python and back is now "for free" (i.e.
775 no extra indirections or argument conversion overheads). `rev. 954b79
776 <https://github.com/pybind/pybind11/commit/954b79>`_.
777
778* Bindings for ``std::valarray<T>``.
779 `#545 <https://github.com/pybind/pybind11/pull/545>`_.
780
781* Improved support for C++17 capable compilers.
782 `#562 <https://github.com/pybind/pybind11/pull/562>`_.
783
784* Bindings for ``std::optional<t>``.
785 `#475 <https://github.com/pybind/pybind11/pull/475>`_,
786 `#476 <https://github.com/pybind/pybind11/pull/476>`_,
787 `#479 <https://github.com/pybind/pybind11/pull/479>`_,
788 `#499 <https://github.com/pybind/pybind11/pull/499>`_, and
789 `#501 <https://github.com/pybind/pybind11/pull/501>`_.
790
791* ``stl_bind.h``: general improvements and support for ``std::map`` and
792 ``std::unordered_map``.
793 `#490 <https://github.com/pybind/pybind11/pull/490>`_,
794 `#282 <https://github.com/pybind/pybind11/pull/282>`_,
795 `#235 <https://github.com/pybind/pybind11/pull/235>`_.
796
797* The ``std::tuple``, ``std::pair``, ``std::list``, and ``std::vector`` type
798 casters now accept any Python sequence type as input. `rev. 107285
799 <https://github.com/pybind/pybind11/commit/107285>`_.
800
801* Improved CMake Python detection on multi-architecture Linux.
802 `#532 <https://github.com/pybind/pybind11/pull/532>`_.
803
804* Infrastructure to selectively disable or enable parts of the automatically
805 generated docstrings. `#486 <https://github.com/pybind/pybind11/pull/486>`_.
806
807* ``reference`` and ``reference_internal`` are now the default return value
808 properties for static and non-static properties, respectively. `#473
809 <https://github.com/pybind/pybind11/pull/473>`_. (the previous defaults
810 were ``automatic``). `#473 <https://github.com/pybind/pybind11/pull/473>`_.
811
812* Support for ``std::unique_ptr`` with non-default deleters or no deleter at
813 all (``py::nodelete``). `#384 <https://github.com/pybind/pybind11/pull/384>`_.
814
Wenzel Jakob3c796712016-12-23 16:19:36 +0100815* Deprecated ``handle::call()`` method. The new syntax to call Python
816 functions is simply ``handle()``. It can also be invoked explicitly via
Wenzel Jakobd3549d62016-12-23 16:01:04 +0100817 ``handle::operator<X>()``, where ``X`` is an optional return value policy.
818
819* Print more informative error messages when ``make_tuple()`` or ``cast()``
820 fail. `#262 <https://github.com/pybind/pybind11/pull/262>`_.
821
822* Creation of holder types for classes deriving from
823 ``std::enable_shared_from_this<>`` now also works for ``const`` values.
824 `#260 <https://github.com/pybind/pybind11/pull/260>`_.
825
826* ``make_iterator()`` improvements for better compatibility with various
827 types (now uses prefix increment operator); it now also accepts iterators
828 with different begin/end types as long as they are equality comparable.
829 `#247 <https://github.com/pybind/pybind11/pull/247>`_.
830
831* ``arg()`` now accepts a wider range of argument types for default values.
832 `#244 <https://github.com/pybind/pybind11/pull/244>`_.
833
834* Support ``keep_alive`` where the nurse object may be ``None``. `#341
835 <https://github.com/pybind/pybind11/pull/341>`_.
836
837* Added constructors for ``str`` and ``bytes`` from zero-terminated char
838 pointers, and from char pointers and length. Added constructors for ``str``
839 from ``bytes`` and for ``bytes`` from ``str``, which will perform UTF-8
840 decoding/encoding as required.
841
842* Many other improvements of library internals without user-visible changes
843
Wenzel Jakoba720a602016-07-12 18:02:13 +0200844
8451.8.1 (July 12, 2016)
846----------------------
Wenzel Jakobc47d4982016-07-11 23:40:28 +0200847* Fixed a rare but potentially very severe issue when the garbage collector ran
848 during pybind11 type creation.
Wenzel Jakob1cbe7ef2016-06-14 14:55:10 +0200849
Wenzel Jakobf9502152016-06-14 15:00:46 +02008501.8.0 (June 14, 2016)
Wenzel Jakob1cbe7ef2016-06-14 14:55:10 +0200851----------------------
852* Redesigned CMake build system which exports a convenient
853 ``pybind11_add_module`` function to parent projects.
854* ``std::vector<>`` type bindings analogous to Boost.Python's ``indexing_suite``
855* Transparent conversion of sparse and dense Eigen matrices and vectors (``eigen.h``)
856* Added an ``ExtraFlags`` template argument to the NumPy ``array_t<>`` wrapper
857 to disable an enforced cast that may lose precision, e.g. to create overloads
858 for different precisions and complex vs real-valued matrices.
Wenzel Jakob3f200fa2016-05-17 15:35:29 +0200859* Prevent implicit conversion of floating point values to integral types in
860 function arguments
Wenzel Jakob163ac2e2016-05-03 14:16:18 +0200861* Fixed incorrect default return value policy for functions returning a shared
862 pointer
Wenzel Jakob38d8b8c2016-05-31 09:53:28 +0200863* Don't allow registering a type via ``class_`` twice
Wenzel Jakob163ac2e2016-05-03 14:16:18 +0200864* Don't allow casting a ``None`` value into a C++ lvalue reference
865* Fixed a crash in ``enum_::operator==`` that was triggered by the ``help()`` command
866* Improved detection of whether or not custom C++ types can be copy/move-constructed
867* Extended ``str`` type to also work with ``bytes`` instances
Wenzel Jakob1cbe7ef2016-06-14 14:55:10 +0200868* Added a ``"name"_a`` user defined string literal that is equivalent to ``py::arg("name")``.
869* When specifying function arguments via ``py::arg``, the test that verifies
870 the number of arguments now runs at compile time.
Wenzel Jakob163ac2e2016-05-03 14:16:18 +0200871* Added ``[[noreturn]]`` attribute to ``pybind11_fail()`` to quench some
872 compiler warnings
Wenzel Jakob86d825f2016-05-26 13:19:27 +0200873* List function arguments in exception text when the dispatch code cannot find
874 a matching overload
Wenzel Jakob1cbe7ef2016-06-14 14:55:10 +0200875* Added ``PYBIND11_OVERLOAD_NAME`` and ``PYBIND11_OVERLOAD_PURE_NAME`` macros which
Wenzel Jakobf9502152016-06-14 15:00:46 +0200876 can be used to override virtual methods whose name differs in C++ and Python
Wenzel Jakob1cbe7ef2016-06-14 14:55:10 +0200877 (e.g. ``__call__`` and ``operator()``)
Wenzel Jakob163ac2e2016-05-03 14:16:18 +0200878* Various minor ``iterator`` and ``make_iterator()`` improvements
Wenzel Jakob86d825f2016-05-26 13:19:27 +0200879* Transparently support ``__bool__`` on Python 2.x and Python 3.x
880* Fixed issue with destructor of unpickled object not being called
Wenzel Jakob163ac2e2016-05-03 14:16:18 +0200881* Minor CMake build system improvements on Windows
Wenzel Jakob86d825f2016-05-26 13:19:27 +0200882* New ``pybind11::args`` and ``pybind11::kwargs`` types to create functions which
883 take an arbitrary number of arguments and keyword arguments
884* New syntax to call a Python function from C++ using ``*args`` and ``*kwargs``
Wenzel Jakob1cbe7ef2016-06-14 14:55:10 +0200885* The functions ``def_property_*`` now correctly process docstring arguments (these
886 formerly caused a segmentation fault)
887* Many ``mkdoc.py`` improvements (enumerations, template arguments, ``DOC()``
888 macro accepts more arguments)
889* Cygwin support
890* Documentation improvements (pickling support, ``keep_alive``, macro usage)
Wenzel Jakobc4d7ccd2016-04-30 22:00:44 +0200891
Wenzel Jakobe70b2ab2016-04-30 19:58:33 +02008921.7 (April 30, 2016)
Wenzel Jakobbb79d7b2016-04-21 12:23:20 +0200893----------------------
Wenzel Jakob1ac22e32016-04-25 23:25:40 +0200894* Added a new ``move`` return value policy that triggers C++11 move semantics.
Wenzel Jakobdd7ec342016-04-29 10:06:24 +0200895 The automatic return value policy falls back to this case whenever a rvalue
Wenzel Jakob1ac22e32016-04-25 23:25:40 +0200896 reference is encountered
Wenzel Jakobe84f5572016-04-26 23:19:19 +0200897* Significantly more general GIL state routines that are used instead of
898 Python's troublesome ``PyGILState_Ensure`` and ``PyGILState_Release`` API
Wenzel Jakobdd7ec342016-04-29 10:06:24 +0200899* Redesign of opaque types that drastically simplifies their usage
Wenzel Jakobe70b2ab2016-04-30 19:58:33 +0200900* Extended ability to pass values of type ``[const] void *``
Wenzel Jakob1ac22e32016-04-25 23:25:40 +0200901* ``keep_alive`` fix: don't fail when there is no patient
Wenzel Jakobdd7ec342016-04-29 10:06:24 +0200902* ``functional.h``: acquire the GIL before calling a Python function
Wenzel Jakob1ac22e32016-04-25 23:25:40 +0200903* Added Python RAII type wrappers ``none`` and ``iterable``
904* Added ``*args`` and ``*kwargs`` pass-through parameters to
905 ``pybind11.get_include()`` function
Wenzel Jakobdd7ec342016-04-29 10:06:24 +0200906* Iterator improvements and fixes
907* Documentation on return value policies and opaque types improved
Wenzel Jakobbb79d7b2016-04-21 12:23:20 +0200908
Wenzel Jakobe70b2ab2016-04-30 19:58:33 +02009091.6 (April 30, 2016)
910----------------------
911* Skipped due to upload to PyPI gone wrong and inability to recover
912 (https://github.com/pypa/packaging-problems/issues/74)
913
Wenzel Jakobbb79d7b2016-04-21 12:23:20 +02009141.5 (April 21, 2016)
Wenzel Jakob2c5d5602016-04-11 18:46:11 +0200915----------------------
Wenzel Jakobc79dbe42016-04-17 21:54:31 +0200916* For polymorphic types, use RTTI to try to return the closest type registered with pybind11
Wenzel Jakobd7efa4f2016-04-13 13:45:09 +0200917* Pickling support for serializing and unserializing C++ instances to a byte stream in Python
Wenzel Jakobb2825952016-04-13 23:33:00 +0200918* Added a convenience routine ``make_iterator()`` which turns a range indicated
919 by a pair of C++ iterators into a iterable Python object
920* Added ``len()`` and a variadic ``make_tuple()`` function
Wenzel Jakobb2b44a92016-04-15 17:50:40 +0200921* Addressed a rare issue that could confuse the current virtual function
922 dispatcher and another that could lead to crashes in multi-threaded
923 applications
Wenzel Jakobb2825952016-04-13 23:33:00 +0200924* Added a ``get_include()`` function to the Python module that returns the path
925 of the directory containing the installed pybind11 header files
Wenzel Jakob1c329aa2016-04-13 02:37:36 +0200926* Documentation improvements: import issues, symbol visibility, pickling, limitations
Wenzel Jakobdbe43ff2016-04-21 12:21:14 +0200927* Added casting support for ``std::reference_wrapper<>``
Wenzel Jakob2c5d5602016-04-11 18:46:11 +0200928
Wenzel Jakob33c2a042016-04-07 09:06:49 +02009291.4 (April 7, 2016)
Wenzel Jakobd2385e82016-03-08 18:04:43 +0100930--------------------------
Wenzel Jakob81dfd2c2016-03-08 19:40:32 +0100931* Transparent type conversion for ``std::wstring`` and ``wchar_t``
Wenzel Jakob0e6ca592016-04-07 08:49:37 +0200932* Allow passing ``nullptr``-valued strings
Wenzel Jakob34116732016-04-06 17:55:41 +0200933* Transparent passing of ``void *`` pointers using capsules
Wenzel Jakob0e6ca592016-04-07 08:49:37 +0200934* Transparent support for returning values wrapped in ``std::unique_ptr<>``
Wenzel Jakob4e455dd2016-03-09 16:38:28 +0100935* Improved docstring generation for compatibility with Sphinx
Wenzel Jakob34116732016-04-06 17:55:41 +0200936* Nicer debug error message when default parameter construction fails
937* Support for "opaque" types that bypass the transparent conversion layer for STL containers
938* Redesigned type casting interface to avoid ambiguities that could occasionally cause compiler errors
Wenzel Jakob2c5d5602016-04-11 18:46:11 +0200939* Redesigned property implementation; fixes crashes due to an unfortunate default return value policy
Wenzel Jakob4e455dd2016-03-09 16:38:28 +0100940* Anaconda package generation support
Wenzel Jakobd2385e82016-03-08 18:04:43 +0100941
9421.3 (March 8, 2016)
Wenzel Jakob8ed28082016-02-07 17:32:37 +0100943--------------------------
Wenzel Jakobcf2b87a2016-02-22 17:32:44 +0100944
945* Added support for the Intel C++ compiler (v15+)
946* Added support for the STL unordered set/map data structures
Wenzel Jakobd2385e82016-03-08 18:04:43 +0100947* Added support for the STL linked list data structure
Wenzel Jakobcf2b87a2016-02-22 17:32:44 +0100948* NumPy-style broadcasting support in ``pybind11::vectorize``
Wenzel Jakob2c5d5602016-04-11 18:46:11 +0200949* pybind11 now displays more verbose error messages when ``arg::operator=()`` fails
Wenzel Jakobd2385e82016-03-08 18:04:43 +0100950* pybind11 internal data structures now live in a version-dependent namespace to avoid ABI issues
951* Many, many bugfixes involving corner cases and advanced usage
Wenzel Jakob8ed28082016-02-07 17:32:37 +0100952
9531.2 (February 7, 2016)
Wenzel Jakob1ae77fe2016-01-17 22:36:43 +0100954--------------------------
Wenzel Jakob48548ea2016-01-17 22:36:44 +0100955
Wenzel Jakob1ae77fe2016-01-17 22:36:43 +0100956* Optional: efficient generation of function signatures at compile time using C++14
Wenzel Jakob48548ea2016-01-17 22:36:44 +0100957* Switched to a simpler and more general way of dealing with function default
958 arguments. Unused keyword arguments in function calls are now detected and
959 cause errors as expected
Wenzel Jakob1ae77fe2016-01-17 22:36:43 +0100960* New ``keep_alive`` call policy analogous to Boost.Python's ``with_custodian_and_ward``
Wenzel Jakob48548ea2016-01-17 22:36:44 +0100961* New ``pybind11::base<>`` attribute to indicate a subclass relationship
Wenzel Jakob1ae77fe2016-01-17 22:36:43 +0100962* Improved interface for RAII type wrappers in ``pytypes.h``
963* Use RAII type wrappers consistently within pybind11 itself. This
964 fixes various potential refcount leaks when exceptions occur
Wenzel Jakob2c5d5602016-04-11 18:46:11 +0200965* Added new ``bytes`` RAII type wrapper (maps to ``string`` in Python 2.7)
Wenzel Jakob48548ea2016-01-17 22:36:44 +0100966* Made handle and related RAII classes const correct, using them more
967 consistently everywhere now
Wenzel Jakob1ae77fe2016-01-17 22:36:43 +0100968* Got rid of the ugly ``__pybind11__`` attributes on the Python side---they are
969 now stored in a C++ hash table that is not visible in Python
970* Fixed refcount leaks involving NumPy arrays and bound functions
971* Vastly improved handling of shared/smart pointers
972* Removed an unnecessary copy operation in ``pybind11::vectorize``
973* Fixed naming clashes when both pybind11 and NumPy headers are included
974* Added conversions for additional exception types
Wenzel Jakob48548ea2016-01-17 22:36:44 +0100975* Documentation improvements (using multiple extension modules, smart pointers,
976 other minor clarifications)
Wenzel Jakob61587162016-01-18 22:38:52 +0100977* unified infrastructure for parsing variadic arguments in ``class_`` and cpp_function
Wenzel Jakob1ae77fe2016-01-17 22:36:43 +0100978* Fixed license text (was: ZLIB, should have been: 3-clause BSD)
979* Python 3.2 compatibility
Wenzel Jakobcd4e6ae2016-01-29 11:48:40 +0100980* Fixed remaining issues when accessing types in another plugin module
981* Added enum comparison and casting methods
982* Improved SFINAE-based detection of whether types are copy-constructible
983* Eliminated many warnings about unused variables and the use of ``offsetof()``
Wenzel Jakob8ed28082016-02-07 17:32:37 +0100984* Support for ``std::array<>`` conversions
Wenzel Jakob1ae77fe2016-01-17 22:36:43 +0100985
9861.1 (December 7, 2015)
987--------------------------
988
989* Documentation improvements (GIL, wrapping functions, casting, fixed many typos)
990* Generalized conversion of integer types
991* Improved support for casting function objects
992* Improved support for ``std::shared_ptr<>`` conversions
993* Initial support for ``std::set<>`` conversions
994* Fixed type resolution issue for types defined in a separate plugin module
995* Cmake build system improvements
996* Factored out generic functionality to non-templated code (smaller code size)
997* Added a code size / compile time benchmark vs Boost.Python
998* Added an appveyor CI script
999
10001.0 (October 15, 2015)
1001------------------------
1002* Initial release