blob: af82dc5bc32d20e1b57c80f1bad163dfc475f5d0 [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
12* TBD
13
Wenzel Jakob2a5a5ec2017-08-31 13:58:24 +020014v2.2.0 (August 31, 2017)
Wenzel Jakobd405b1b2017-03-22 22:20:07 +010015-----------------------------------------------------
16
Dean Moldovandb46a892017-08-13 22:25:15 +020017* Support for embedding the Python interpreter. See the
18 :doc:`documentation page </advanced/embedding>` for a
19 full overview of the new features.
20 `#774 <https://github.com/pybind/pybind11/pull/774>`_,
21 `#889 <https://github.com/pybind/pybind11/pull/889>`_,
22 `#892 <https://github.com/pybind/pybind11/pull/892>`_,
23 `#920 <https://github.com/pybind/pybind11/pull/920>`_.
24
25 .. code-block:: cpp
26
27 #include <pybind11/embed.h>
28 namespace py = pybind11;
29
30 int main() {
31 py::scoped_interpreter guard{}; // start the interpreter and keep it alive
32
33 py::print("Hello, World!"); // use the Python API
34 }
35
36* Support for inheriting from multiple C++ bases in Python.
37 `#693 <https://github.com/pybind/pybind11/pull/693>`_.
38
39 .. code-block:: python
40
41 from cpp_module import CppBase1, CppBase2
42
43 class PyDerived(CppBase1, CppBase2):
44 def __init__(self):
45 CppBase1.__init__(self) # C++ bases must be initialized explicitly
46 CppBase2.__init__(self)
47
48* ``PYBIND11_MODULE`` is now the preferred way to create module entry points.
49 ``PYBIND11_PLUGIN`` is deprecated. See :ref:`macros` for details.
50 `#879 <https://github.com/pybind/pybind11/pull/879>`_.
51
52 .. code-block:: cpp
53
54 // new
55 PYBIND11_MODULE(example, m) {
56 m.def("add", [](int a, int b) { return a + b; });
57 }
58
59 // old
60 PYBIND11_PLUGIN(example) {
61 py::module m("example");
62 m.def("add", [](int a, int b) { return a + b; });
63 return m.ptr();
64 }
65
66* pybind11's headers and build system now more strictly enforce hidden symbol
67 visibility for extension modules. This should be seamless for most users,
Dean Moldovan1fb9df62017-08-18 19:26:49 +020068 but see the :doc:`upgrade` if you use a custom build system.
69 `#995 <https://github.com/pybind/pybind11/pull/995>`_.
Dean Moldovandb46a892017-08-13 22:25:15 +020070
71* Support for ``py::module_local`` types which allow multiple modules to
72 export the same C++ types without conflicts. This is useful for opaque
73 types like ``std::vector<int>``. ``py::bind_vector`` and ``py::bind_map``
74 now default to ``py::module_local`` if their elements are builtins or
75 local types. See :ref:`module_local` for details.
76 `#949 <https://github.com/pybind/pybind11/pull/949>`_,
77 `#981 <https://github.com/pybind/pybind11/pull/981>`_,
78 `#995 <https://github.com/pybind/pybind11/pull/995>`_,
79 `#997 <https://github.com/pybind/pybind11/pull/997>`_.
80
81* Custom constructors can now be added very easily using lambdas or factory
82 functions which return a class instance by value, pointer or holder. This
83 supersedes the old placement-new ``__init__`` technique.
84 See :ref:`custom_constructors` for details.
Dean Moldovan4c540442017-08-30 21:53:08 +020085 `#805 <https://github.com/pybind/pybind11/pull/805>`_,
86 `#1014 <https://github.com/pybind/pybind11/pull/1014>`_.
Dean Moldovandb46a892017-08-13 22:25:15 +020087
88 .. code-block:: cpp
89
90 struct Example {
91 Example(std::string);
92 };
93
94 py::class_<Example>(m, "Example")
95 .def(py::init<std::string>()) // existing constructor
96 .def(py::init([](int n) { // custom constructor
97 return std::make_unique<Example>(std::to_string(n));
98 }));
99
Dean Moldovan1e5a7da2017-08-24 01:53:15 +0200100* Similarly to custom constructors, pickling support functions are now bound
101 using the ``py::pickle()`` adaptor which improves type safety. See the
102 :doc:`upgrade` and :ref:`pickling` for details.
103 `#1038 <https://github.com/pybind/pybind11/pull/1038>`_.
104
Dean Moldovandb46a892017-08-13 22:25:15 +0200105* Builtin support for converting C++17 standard library types and general
106 conversion improvements:
107
108 1. C++17 ``std::variant`` is supported right out of the box. C++11/14
109 equivalents (e.g. ``boost::variant``) can also be added with a simple
110 user-defined specialization. See :ref:`cpp17_container_casters` for details.
111 `#811 <https://github.com/pybind/pybind11/pull/811>`_,
112 `#845 <https://github.com/pybind/pybind11/pull/845>`_,
113 `#989 <https://github.com/pybind/pybind11/pull/989>`_.
114
115 2. Out-of-the-box support for C++17 ``std::string_view``.
116 `#906 <https://github.com/pybind/pybind11/pull/906>`_.
117
118 3. Improved compatibility of the builtin ``optional`` converter.
119 `#874 <https://github.com/pybind/pybind11/pull/874>`_.
120
121 4. The ``bool`` converter now accepts ``numpy.bool_`` and types which
122 define ``__bool__`` (Python 3.x) or ``__nonzero__`` (Python 2.7).
123 `#925 <https://github.com/pybind/pybind11/pull/925>`_.
124
125 5. C++-to-Python casters are now more efficient and move elements out
126 of rvalue containers whenever possible.
127 `#851 <https://github.com/pybind/pybind11/pull/851>`_,
128 `#936 <https://github.com/pybind/pybind11/pull/936>`_,
129 `#938 <https://github.com/pybind/pybind11/pull/938>`_.
130
131 6. Fixed ``bytes`` to ``std::string/char*`` conversion on Python 3.
132 `#817 <https://github.com/pybind/pybind11/pull/817>`_.
133
134 7. Fixed lifetime of temporary C++ objects created in Python-to-C++ conversions.
135 `#924 <https://github.com/pybind/pybind11/pull/924>`_.
136
Henry Schreiner8b405052017-08-24 17:12:43 -0700137* Scope guard call policy for RAII types, e.g. ``py::call_guard<py::gil_scoped_release>()``,
138 ``py::call_guard<py::scoped_ostream_redirect>()``. See :ref:`call_policies` for details.
Dean Moldovandb46a892017-08-13 22:25:15 +0200139 `#740 <https://github.com/pybind/pybind11/pull/740>`_.
140
Henry Schreiner8b405052017-08-24 17:12:43 -0700141* Utility for redirecting C++ streams to Python (e.g. ``std::cout`` ->
142 ``sys.stdout``). Scope guard ``py::scoped_ostream_redirect`` in C++ and
143 a context manager in Python. See :ref:`ostream_redirect`.
144 `#1009 <https://github.com/pybind/pybind11/pull/1009>`_.
145
Dean Moldovandb46a892017-08-13 22:25:15 +0200146* Improved handling of types and exceptions across module boundaries.
147 `#915 <https://github.com/pybind/pybind11/pull/915>`_,
148 `#951 <https://github.com/pybind/pybind11/pull/951>`_,
149 `#995 <https://github.com/pybind/pybind11/pull/995>`_.
150
151* Fixed destruction order of ``py::keep_alive`` nurse/patient objects
152 in reference cycles.
153 `#856 <https://github.com/pybind/pybind11/pull/856>`_.
154
155* Numpy and buffer protocol related improvements:
156
157 1. Support for negative strides in Python buffer objects/numpy arrays. This
158 required changing integers from unsigned to signed for the related C++ APIs.
159 Note: If you have compiler warnings enabled, you may notice some new conversion
160 warnings after upgrading. These can be resolved with ``static_cast``.
161 `#782 <https://github.com/pybind/pybind11/pull/782>`_.
162
163 2. Support ``std::complex`` and arrays inside ``PYBIND11_NUMPY_DTYPE``.
164 `#831 <https://github.com/pybind/pybind11/pull/831>`_,
165 `#832 <https://github.com/pybind/pybind11/pull/832>`_.
166
167 3. Support for constructing ``py::buffer_info`` and ``py::arrays`` using
168 arbitrary containers or iterators instead of requiring a ``std::vector``.
169 `#788 <https://github.com/pybind/pybind11/pull/788>`_,
170 `#822 <https://github.com/pybind/pybind11/pull/822>`_,
171 `#860 <https://github.com/pybind/pybind11/pull/860>`_.
172
173 4. Explicitly check numpy version and require >= 1.7.0.
174 `#819 <https://github.com/pybind/pybind11/pull/819>`_.
175
176* Support for allowing/prohibiting ``None`` for specific arguments and improved
177 ``None`` overload resolution order. See :ref:`none_arguments` for details.
178 `#843 <https://github.com/pybind/pybind11/pull/843>`_.
179 `#859 <https://github.com/pybind/pybind11/pull/859>`_.
180
181* Added ``py::exec()`` as a shortcut for ``py::eval<py::eval_statements>()``
182 and support for C++11 raw string literals as input. See :ref:`eval`.
183 `#766 <https://github.com/pybind/pybind11/pull/766>`_,
184 `#827 <https://github.com/pybind/pybind11/pull/827>`_.
185
186* ``py::vectorize()`` ignores non-vectorizable arguments and supports
187 member functions.
188 `#762 <https://github.com/pybind/pybind11/pull/762>`_.
189
190* Support for bound methods as callbacks (``pybind11/functional.h``).
191 `#815 <https://github.com/pybind/pybind11/pull/815>`_.
192
193* Allow aliasing pybind11 methods: ``cls.attr("foo") = cls.attr("bar")``.
194 `#802 <https://github.com/pybind/pybind11/pull/802>`_.
195
196* Don't allow mixed static/non-static overloads.
197 `#804 <https://github.com/pybind/pybind11/pull/804>`_.
198
199* Fixed overriding static properties in derived classes.
200 `#784 <https://github.com/pybind/pybind11/pull/784>`_.
201
Dean Moldovan4c540442017-08-30 21:53:08 +0200202* Improved deduction of member functions of a derived class when its bases
203 aren't registered with pybind11.
Dean Moldovandb46a892017-08-13 22:25:15 +0200204 `#855 <https://github.com/pybind/pybind11/pull/855>`_.
205
206 .. code-block:: cpp
207
208 struct Base {
209 int foo() { return 42; }
210 }
211
212 struct Derived : Base {}
213
214 // Now works, but previously required also binding `Base`
215 py::class_<Derived>(m, "Derived")
216 .def("foo", &Derived::foo); // function is actually from `Base`
217
Wenzel Jakobb12a9d62017-08-23 16:30:56 +0200218* The implementation of ``py::init<>`` now uses C++11 brace initialization
219 syntax to construct instances, which permits binding implicit constructors of
220 aggregate types. `#1015 <https://github.com/pybind/pybind11/pull/1015>`_.
221
222 .. code-block:: cpp
223
224 struct Aggregate {
225 int a;
226 std::string b;
227 };
228
229 py::class_<Aggregate>(m, "Aggregate")
230 .def(py::init<int, const std::string &>());
231
Dean Moldovandb46a892017-08-13 22:25:15 +0200232* Fixed issues with multiple inheritance with offset base/derived pointers.
233 `#812 <https://github.com/pybind/pybind11/pull/812>`_,
234 `#866 <https://github.com/pybind/pybind11/pull/866>`_,
235 `#960 <https://github.com/pybind/pybind11/pull/960>`_.
236
Dean Moldovan4c540442017-08-30 21:53:08 +0200237* Fixed reference leak of type objects.
238 `#1030 <https://github.com/pybind/pybind11/pull/1030>`_.
239
Dean Moldovandb46a892017-08-13 22:25:15 +0200240* Improved support for the ``/std:c++14`` and ``/std:c++latest`` modes
241 on MSVC 2017.
242 `#841 <https://github.com/pybind/pybind11/pull/841>`_,
243 `#999 <https://github.com/pybind/pybind11/pull/999>`_.
244
245* Fixed detection of private operator new on MSVC.
246 `#893 <https://github.com/pybind/pybind11/pull/893>`_,
247 `#918 <https://github.com/pybind/pybind11/pull/918>`_.
248
249* Intel C++ compiler compatibility fixes.
250 `#937 <https://github.com/pybind/pybind11/pull/937>`_.
251
252* Fixed implicit conversion of `py::enum_` to integer types on Python 2.7.
253 `#821 <https://github.com/pybind/pybind11/pull/821>`_.
254
Bruce Merry37de2da2017-08-30 14:22:00 +0200255* Added ``py::hash`` to fetch the hash value of Python objects, and
256 ``.def(hash(py::self))`` to provide the C++ ``std::hash`` as the Python
257 ``__hash__`` method.
258 `#1034 <https://github.com/pybind/pybind11/pull/1034>`_.
259
Dean Moldovandb46a892017-08-13 22:25:15 +0200260* Fixed ``__truediv__`` on Python 2 and ``__itruediv__`` on Python 3.
261 `#867 <https://github.com/pybind/pybind11/pull/867>`_.
262
263* ``py::capsule`` objects now support the ``name`` attribute. This is useful
264 for interfacing with ``scipy.LowLevelCallable``.
265 `#902 <https://github.com/pybind/pybind11/pull/902>`_.
266
267* Fixed ``py::make_iterator``'s ``__next__()`` for past-the-end calls.
268 `#897 <https://github.com/pybind/pybind11/pull/897>`_.
269
270* Added ``error_already_set::matches()`` for checking Python exceptions.
271 `#772 <https://github.com/pybind/pybind11/pull/772>`_.
272
273* Deprecated ``py::error_already_set::clear()``. It's no longer needed
274 following a simplification of the ``py::error_already_set`` class.
275 `#954 <https://github.com/pybind/pybind11/pull/954>`_.
276
277* Deprecated ``py::handle::operator==()`` in favor of ``py::handle::is()``
278 `#825 <https://github.com/pybind/pybind11/pull/825>`_.
279
280* Deprecated ``py::object::borrowed``/``py::object::stolen``.
281 Use ``py::object::borrowed_t{}``/``py::object::stolen_t{}`` instead.
282 `#771 <https://github.com/pybind/pybind11/pull/771>`_.
283
Dean Moldovan4c540442017-08-30 21:53:08 +0200284* Changed internal data structure versioning to avoid conflicts between
285 modules compiled with different revisions of pybind11.
286 `#1012 <https://github.com/pybind/pybind11/pull/1012>`_.
287
Dean Moldovandb46a892017-08-13 22:25:15 +0200288* Additional compile-time and run-time error checking and more informative messages.
289 `#786 <https://github.com/pybind/pybind11/pull/786>`_,
290 `#794 <https://github.com/pybind/pybind11/pull/794>`_,
291 `#803 <https://github.com/pybind/pybind11/pull/803>`_.
292
293* Various minor improvements and fixes.
294 `#764 <https://github.com/pybind/pybind11/pull/764>`_,
295 `#791 <https://github.com/pybind/pybind11/pull/791>`_,
296 `#795 <https://github.com/pybind/pybind11/pull/795>`_,
297 `#840 <https://github.com/pybind/pybind11/pull/840>`_,
298 `#844 <https://github.com/pybind/pybind11/pull/844>`_,
299 `#846 <https://github.com/pybind/pybind11/pull/846>`_,
300 `#849 <https://github.com/pybind/pybind11/pull/849>`_,
301 `#858 <https://github.com/pybind/pybind11/pull/858>`_,
302 `#862 <https://github.com/pybind/pybind11/pull/862>`_,
303 `#871 <https://github.com/pybind/pybind11/pull/871>`_,
304 `#872 <https://github.com/pybind/pybind11/pull/872>`_,
305 `#881 <https://github.com/pybind/pybind11/pull/881>`_,
306 `#888 <https://github.com/pybind/pybind11/pull/888>`_,
307 `#899 <https://github.com/pybind/pybind11/pull/899>`_,
308 `#928 <https://github.com/pybind/pybind11/pull/928>`_,
309 `#931 <https://github.com/pybind/pybind11/pull/931>`_,
310 `#944 <https://github.com/pybind/pybind11/pull/944>`_,
311 `#950 <https://github.com/pybind/pybind11/pull/950>`_,
312 `#952 <https://github.com/pybind/pybind11/pull/952>`_,
313 `#962 <https://github.com/pybind/pybind11/pull/962>`_,
314 `#965 <https://github.com/pybind/pybind11/pull/965>`_,
315 `#970 <https://github.com/pybind/pybind11/pull/970>`_,
Dean Moldovandb46a892017-08-13 22:25:15 +0200316 `#978 <https://github.com/pybind/pybind11/pull/978>`_,
Dean Moldovan4c540442017-08-30 21:53:08 +0200317 `#979 <https://github.com/pybind/pybind11/pull/979>`_,
Wenzel Jakoba1041192017-08-28 16:35:32 +0200318 `#986 <https://github.com/pybind/pybind11/pull/986>`_,
Dean Moldovan4c540442017-08-30 21:53:08 +0200319 `#1020 <https://github.com/pybind/pybind11/pull/1020>`_,
320 `#1027 <https://github.com/pybind/pybind11/pull/1027>`_,
Wenzel Jakoba1041192017-08-28 16:35:32 +0200321 `#1037 <https://github.com/pybind/pybind11/pull/1037>`_.
Dean Moldovandb46a892017-08-13 22:25:15 +0200322
323* Testing improvements.
324 `#798 <https://github.com/pybind/pybind11/pull/798>`_,
325 `#882 <https://github.com/pybind/pybind11/pull/882>`_,
326 `#898 <https://github.com/pybind/pybind11/pull/898>`_,
327 `#900 <https://github.com/pybind/pybind11/pull/900>`_,
328 `#921 <https://github.com/pybind/pybind11/pull/921>`_,
329 `#923 <https://github.com/pybind/pybind11/pull/923>`_,
330 `#963 <https://github.com/pybind/pybind11/pull/963>`_.
331
Wenzel Jakobdb200952017-04-07 02:03:46 +0200332v2.1.1 (April 7, 2017)
333-----------------------------------------------------
334
335* Fixed minimum version requirement for MSVC 2015u3
336 `#773 <https://github.com/pybind/pybind11/pull/773>`_.
337
Wenzel Jakobd405b1b2017-03-22 22:20:07 +0100338v2.1.0 (March 22, 2017)
Wenzel Jakoba9730be2017-01-06 14:18:44 +0100339-----------------------------------------------------
340
Wenzel Jakob62e5fef2017-03-22 22:07:45 +0100341* pybind11 now performs function overload resolution in two phases. The first
342 phase only considers exact type matches, while the second allows for implicit
343 conversions to take place. A special ``noconvert()`` syntax can be used to
344 completely disable implicit conversions for specific arguments.
345 `#643 <https://github.com/pybind/pybind11/pull/643>`_,
346 `#634 <https://github.com/pybind/pybind11/pull/634>`_,
347 `#650 <https://github.com/pybind/pybind11/pull/650>`_.
348
349* Fixed a regression where static properties no longer worked with classes
350 using multiple inheritance. The ``py::metaclass`` attribute is no longer
351 necessary (and deprecated as of this release) when binding classes with
352 static properties.
353 `#679 <https://github.com/pybind/pybind11/pull/679>`_,
354
355* Classes bound using ``pybind11`` can now use custom metaclasses.
356 `#679 <https://github.com/pybind/pybind11/pull/679>`_,
357
358* ``py::args`` and ``py::kwargs`` can now be mixed with other positional
359 arguments when binding functions using pybind11.
360 `#611 <https://github.com/pybind/pybind11/pull/611>`_.
361
362* Improved support for C++11 unicode string and character types; added
363 extensive documentation regarding pybind11's string conversion behavior.
364 `#624 <https://github.com/pybind/pybind11/pull/624>`_,
365 `#636 <https://github.com/pybind/pybind11/pull/636>`_,
366 `#715 <https://github.com/pybind/pybind11/pull/715>`_.
367
368* pybind11 can now avoid expensive copies when converting Eigen arrays to NumPy
369 arrays (and vice versa). `#610 <https://github.com/pybind/pybind11/pull/610>`_.
370
371* The "fast path" in ``py::vectorize`` now works for any full-size group of C or
372 F-contiguous arrays. The non-fast path is also faster since it no longer performs
373 copies of the input arguments (except when type conversions are necessary).
374 `#610 <https://github.com/pybind/pybind11/pull/610>`_.
375
376* Added fast, unchecked access to NumPy arrays via a proxy object.
377 `#746 <https://github.com/pybind/pybind11/pull/746>`_.
378
Wenzel Jakob0d929382017-03-22 22:52:29 +0100379* Transparent support for class-specific ``operator new`` and
Wenzel Jakob62e5fef2017-03-22 22:07:45 +0100380 ``operator delete`` implementations.
381 `#755 <https://github.com/pybind/pybind11/pull/755>`_.
382
383* Slimmer and more efficient STL-compatible iterator interface for sequence types.
384 `#662 <https://github.com/pybind/pybind11/pull/662>`_.
385
386* Improved custom holder type support.
387 `#607 <https://github.com/pybind/pybind11/pull/607>`_.
388
389* ``nullptr`` to ``None`` conversion fixed in various builtin type casters.
390 `#732 <https://github.com/pybind/pybind11/pull/732>`_.
391
392* ``enum_`` now exposes its members via a special ``__members__`` attribute.
393 `#666 <https://github.com/pybind/pybind11/pull/666>`_.
394
395* ``std::vector`` bindings created using ``stl_bind.h`` can now optionally
396 implement the buffer protocol. `#488 <https://github.com/pybind/pybind11/pull/488>`_.
397
398* Automated C++ reference documentation using doxygen and breathe.
399 `#598 <https://github.com/pybind/pybind11/pull/598>`_.
400
401* Added minimum compiler version assertions.
402 `#727 <https://github.com/pybind/pybind11/pull/727>`_.
403
404* Improved compatibility with C++1z.
405 `#677 <https://github.com/pybind/pybind11/pull/677>`_.
406
407* Improved ``py::capsule`` API. Can be used to implement cleanup
408 callbacks that are involved at module destruction time.
409 `#752 <https://github.com/pybind/pybind11/pull/752>`_.
410
411* Various minor improvements and fixes.
412 `#595 <https://github.com/pybind/pybind11/pull/595>`_,
413 `#588 <https://github.com/pybind/pybind11/pull/588>`_,
414 `#589 <https://github.com/pybind/pybind11/pull/589>`_,
415 `#603 <https://github.com/pybind/pybind11/pull/603>`_,
416 `#619 <https://github.com/pybind/pybind11/pull/619>`_,
417 `#648 <https://github.com/pybind/pybind11/pull/648>`_,
418 `#695 <https://github.com/pybind/pybind11/pull/695>`_,
419 `#720 <https://github.com/pybind/pybind11/pull/720>`_,
420 `#723 <https://github.com/pybind/pybind11/pull/723>`_,
421 `#729 <https://github.com/pybind/pybind11/pull/729>`_,
422 `#724 <https://github.com/pybind/pybind11/pull/724>`_,
423 `#742 <https://github.com/pybind/pybind11/pull/742>`_,
424 `#753 <https://github.com/pybind/pybind11/pull/753>`_.
Wenzel Jakoba9730be2017-01-06 14:18:44 +0100425
Wenzel Jakobf8dafe92017-01-04 15:09:49 +0100426v2.0.1 (Jan 4, 2017)
427-----------------------------------------------------
428
429* Fix pointer to reference error in type_caster on MSVC
430 `#583 <https://github.com/pybind/pybind11/pull/583>`_.
431
432* Fixed a segmentation in the test suite due to a typo
433 `cd7eac <https://github.com/pybind/pybind11/commit/cd7eac>`_.
434
Wenzel Jakobe33ef9c2017-01-01 13:55:06 +0100435v2.0.0 (Jan 1, 2017)
Wenzel Jakobed52f462016-12-26 13:18:26 +0100436-----------------------------------------------------
437
438* Fixed a reference counting regression affecting types with custom metaclasses
439 (introduced in v2.0.0-rc1).
440 `#571 <https://github.com/pybind/pybind11/pull/571>`_.
441
442* Quenched a CMake policy warning.
443 `#570 <https://github.com/pybind/pybind11/pull/570>`_.
444
Wenzel Jakobe33ef9c2017-01-01 13:55:06 +0100445v2.0.0-rc1 (Dec 23, 2016)
Wenzel Jakobf88af0c2016-06-22 13:52:31 +0200446-----------------------------------------------------
Wenzel Jakob1cbe7ef2016-06-14 14:55:10 +0200447
Wenzel Jakobd3549d62016-12-23 16:01:04 +0100448The pybind11 developers are excited to issue a release candidate of pybind11
449with a subsequent v2.0.0 release planned in early January next year.
Wenzel Jakob1cbe7ef2016-06-14 14:55:10 +0200450
Wenzel Jakobd3549d62016-12-23 16:01:04 +0100451An incredible amount of effort by went into pybind11 over the last ~5 months,
452leading to a release that is jam-packed with exciting new features and numerous
Wenzel Jakobf8dafe92017-01-04 15:09:49 +0100453usability improvements. The following list links PRs or individual commits
Wenzel Jakobed52f462016-12-26 13:18:26 +0100454whenever applicable.
Wenzel Jakobd3549d62016-12-23 16:01:04 +0100455
456Happy Christmas!
457
458* Support for binding C++ class hierarchies that make use of multiple
459 inheritance. `#410 <https://github.com/pybind/pybind11/pull/410>`_.
460
461* PyPy support: pybind11 now supports nightly builds of PyPy and will
462 interoperate with the future 5.7 release. No code changes are necessary,
463 everything "just" works as usual. Note that we only target the Python 2.7
464 branch for now; support for 3.x will be added once its ``cpyext`` extension
Wenzel Jakobed52f462016-12-26 13:18:26 +0100465 support catches up. A few minor features remain unsupported for the time
466 being (notably dynamic attributes in custom types).
467 `#527 <https://github.com/pybind/pybind11/pull/527>`_.
Wenzel Jakobd3549d62016-12-23 16:01:04 +0100468
469* Significant work on the documentation -- in particular, the monolitic
470 ``advanced.rst`` file was restructured into a easier to read hierarchical
471 organization. `#448 <https://github.com/pybind/pybind11/pull/448>`_.
472
473* Many NumPy-related improvements:
474
475 1. Object-oriented API to access and modify NumPy ``ndarray`` instances,
476 replicating much of the corresponding NumPy C API functionality.
477 `#402 <https://github.com/pybind/pybind11/pull/402>`_.
478
479 2. NumPy array ``dtype`` array descriptors are now first-class citizens and
480 are exposed via a new class ``py::dtype``.
481
482 3. Structured dtypes can be registered using the ``PYBIND11_NUMPY_DTYPE()``
483 macro. Special ``array`` constructors accepting dtype objects were also
484 added.
485
486 One potential caveat involving this change: format descriptor strings
487 should now be accessed via ``format_descriptor::format()`` (however, for
488 compatibility purposes, the old syntax ``format_descriptor::value`` will
489 still work for non-structured data types). `#308
490 <https://github.com/pybind/pybind11/pull/308>`_.
491
492 4. Further improvements to support structured dtypes throughout the system.
493 `#472 <https://github.com/pybind/pybind11/pull/472>`_,
494 `#474 <https://github.com/pybind/pybind11/pull/474>`_,
495 `#459 <https://github.com/pybind/pybind11/pull/459>`_,
496 `#453 <https://github.com/pybind/pybind11/pull/453>`_,
497 `#452 <https://github.com/pybind/pybind11/pull/452>`_, and
498 `#505 <https://github.com/pybind/pybind11/pull/505>`_.
499
500 5. Fast access operators. `#497 <https://github.com/pybind/pybind11/pull/497>`_.
501
502 6. Constructors for arrays whose storage is owned by another object.
503 `#440 <https://github.com/pybind/pybind11/pull/440>`_.
504
505 7. Added constructors for ``array`` and ``array_t`` explicitly accepting shape
506 and strides; if strides are not provided, they are deduced assuming
507 C-contiguity. Also added simplified constructors for 1-dimensional case.
508
509 8. Added buffer/NumPy support for ``char[N]`` and ``std::array<char, N>`` types.
510
511 9. Added ``memoryview`` wrapper type which is constructible from ``buffer_info``.
512
513* Eigen: many additional conversions and support for non-contiguous
514 arrays/slices.
515 `#427 <https://github.com/pybind/pybind11/pull/427>`_,
516 `#315 <https://github.com/pybind/pybind11/pull/315>`_,
517 `#316 <https://github.com/pybind/pybind11/pull/316>`_,
518 `#312 <https://github.com/pybind/pybind11/pull/312>`_, and
519 `#267 <https://github.com/pybind/pybind11/pull/267>`_
520
521* Incompatible changes in ``class_<...>::class_()``:
522
523 1. Declarations of types that provide access via the buffer protocol must
524 now include the ``py::buffer_protocol()`` annotation as an argument to
525 the ``class_`` constructor.
526
527 2. Declarations of types that require a custom metaclass (i.e. all classes
528 which include static properties via commands such as
529 ``def_readwrite_static()``) must now include the ``py::metaclass()``
530 annotation as an argument to the ``class_`` constructor.
531
532 These two changes were necessary to make type definitions in pybind11
533 future-proof, and to support PyPy via its cpyext mechanism. `#527
534 <https://github.com/pybind/pybind11/pull/527>`_.
535
536
537 3. This version of pybind11 uses a redesigned mechnism for instantiating
538 trempoline classes that are used to override virtual methods from within
539 Python. This led to the following user-visible syntax change: instead of
540
541 .. code-block:: cpp
542
543 py::class_<TrampolineClass>("MyClass")
544 .alias<MyClass>()
545 ....
546
547 write
548
549 .. code-block:: cpp
550
551 py::class_<MyClass, TrampolineClass>("MyClass")
552 ....
553
554 Importantly, both the original and the trampoline class are now
555 specified as an arguments (in arbitrary order) to the ``py::class_``
556 template, and the ``alias<..>()`` call is gone. The new scheme has zero
557 overhead in cases when Python doesn't override any functions of the
558 underlying C++ class. `rev. 86d825
559 <https://github.com/pybind/pybind11/commit/86d825>`_.
560
Wenzel Jakobe6b2f752016-07-10 10:54:46 +0200561* Added ``eval`` and ``eval_file`` functions for evaluating expressions and
Wenzel Jakobd3549d62016-12-23 16:01:04 +0100562 statements from a string or file. `rev. 0d3fc3
563 <https://github.com/pybind/pybind11/commit/0d3fc3>`_.
564
565* pybind11 can now create types with a modifiable dictionary.
566 `#437 <https://github.com/pybind/pybind11/pull/437>`_ and
567 `#444 <https://github.com/pybind/pybind11/pull/444>`_.
568
569* Support for translation of arbitrary C++ exceptions to Python counterparts.
570 `#296 <https://github.com/pybind/pybind11/pull/296>`_ and
571 `#273 <https://github.com/pybind/pybind11/pull/273>`_.
572
573* Report full backtraces through mixed C++/Python code, better reporting for
574 import errors, fixed GIL management in exception processing.
575 `#537 <https://github.com/pybind/pybind11/pull/537>`_,
576 `#494 <https://github.com/pybind/pybind11/pull/494>`_,
577 `rev. e72d95 <https://github.com/pybind/pybind11/commit/e72d95>`_, and
578 `rev. 099d6e <https://github.com/pybind/pybind11/commit/099d6e>`_.
579
580* Support for bit-level operations, comparisons, and serialization of C++
581 enumerations. `#503 <https://github.com/pybind/pybind11/pull/503>`_,
582 `#508 <https://github.com/pybind/pybind11/pull/508>`_,
583 `#380 <https://github.com/pybind/pybind11/pull/380>`_,
584 `#309 <https://github.com/pybind/pybind11/pull/309>`_.
585 `#311 <https://github.com/pybind/pybind11/pull/311>`_.
586
587* The ``class_`` constructor now accepts its template arguments in any order.
588 `#385 <https://github.com/pybind/pybind11/pull/385>`_.
589
590* Attribute and item accessors now have a more complete interface which makes
591 it possible to chain attributes as in
592 ``obj.attr("a")[key].attr("b").attr("method")(1, 2, 3)``. `#425
593 <https://github.com/pybind/pybind11/pull/425>`_.
594
595* Major redesign of the default and conversion constructors in ``pytypes.h``.
596 `#464 <https://github.com/pybind/pybind11/pull/464>`_.
597
598* Added built-in support for ``std::shared_ptr`` holder type. It is no longer
599 necessary to to include a declaration of the form
600 ``PYBIND11_DECLARE_HOLDER_TYPE(T, std::shared_ptr<T>)`` (though continuing to
601 do so won't cause an error).
602 `#454 <https://github.com/pybind/pybind11/pull/454>`_.
603
604* New ``py::overload_cast`` casting operator to select among multiple possible
605 overloads of a function. An example:
606
607 .. code-block:: cpp
608
609 py::class_<Pet>(m, "Pet")
610 .def("set", py::overload_cast<int>(&Pet::set), "Set the pet's age")
611 .def("set", py::overload_cast<const std::string &>(&Pet::set), "Set the pet's name");
612
613 This feature only works on C++14-capable compilers.
614 `#541 <https://github.com/pybind/pybind11/pull/541>`_.
615
616* C++ types are automatically cast to Python types, e.g. when assigning
617 them as an attribute. For instance, the following is now legal:
618
619 .. code-block:: cpp
620
621 py::module m = /* ... */
622 m.attr("constant") = 123;
623
624 (Previously, a ``py::cast`` call was necessary to avoid a compilation error.)
625 `#551 <https://github.com/pybind/pybind11/pull/551>`_.
626
627* Redesigned ``pytest``-based test suite. `#321 <https://github.com/pybind/pybind11/pull/321>`_.
628
629* Instance tracking to detect reference leaks in test suite. `#324 <https://github.com/pybind/pybind11/pull/324>`_
630
631* pybind11 can now distinguish between multiple different instances that are
632 located at the same memory address, but which have different types.
633 `#329 <https://github.com/pybind/pybind11/pull/329>`_.
634
635* Improved logic in ``move`` return value policy.
636 `#510 <https://github.com/pybind/pybind11/pull/510>`_,
637 `#297 <https://github.com/pybind/pybind11/pull/297>`_.
638
639* Generalized unpacking API to permit calling Python functions from C++ using
640 notation such as ``foo(a1, a2, *args, "ka"_a=1, "kb"_a=2, **kwargs)``. `#372 <https://github.com/pybind/pybind11/pull/372>`_.
641
642* ``py::print()`` function whose behavior matches that of the native Python
643 ``print()`` function. `#372 <https://github.com/pybind/pybind11/pull/372>`_.
644
645* Added ``py::dict`` keyword constructor:``auto d = dict("number"_a=42,
646 "name"_a="World");``. `#372 <https://github.com/pybind/pybind11/pull/372>`_.
647
648* Added ``py::str::format()`` method and ``_s`` literal: ``py::str s = "1 + 2
649 = {}"_s.format(3);``. `#372 <https://github.com/pybind/pybind11/pull/372>`_.
650
651* Added ``py::repr()`` function which is equivalent to Python's builtin
652 ``repr()``. `#333 <https://github.com/pybind/pybind11/pull/333>`_.
653
654* Improved construction and destruction logic for holder types. It is now
655 possible to reference instances with smart pointer holder types without
656 constructing the holder if desired. The ``PYBIND11_DECLARE_HOLDER_TYPE``
657 macro now accepts an optional second parameter to indicate whether the holder
658 type uses intrusive reference counting.
659 `#533 <https://github.com/pybind/pybind11/pull/533>`_ and
660 `#561 <https://github.com/pybind/pybind11/pull/561>`_.
661
662* Mapping a stateless C++ function to Python and back is now "for free" (i.e.
663 no extra indirections or argument conversion overheads). `rev. 954b79
664 <https://github.com/pybind/pybind11/commit/954b79>`_.
665
666* Bindings for ``std::valarray<T>``.
667 `#545 <https://github.com/pybind/pybind11/pull/545>`_.
668
669* Improved support for C++17 capable compilers.
670 `#562 <https://github.com/pybind/pybind11/pull/562>`_.
671
672* Bindings for ``std::optional<t>``.
673 `#475 <https://github.com/pybind/pybind11/pull/475>`_,
674 `#476 <https://github.com/pybind/pybind11/pull/476>`_,
675 `#479 <https://github.com/pybind/pybind11/pull/479>`_,
676 `#499 <https://github.com/pybind/pybind11/pull/499>`_, and
677 `#501 <https://github.com/pybind/pybind11/pull/501>`_.
678
679* ``stl_bind.h``: general improvements and support for ``std::map`` and
680 ``std::unordered_map``.
681 `#490 <https://github.com/pybind/pybind11/pull/490>`_,
682 `#282 <https://github.com/pybind/pybind11/pull/282>`_,
683 `#235 <https://github.com/pybind/pybind11/pull/235>`_.
684
685* The ``std::tuple``, ``std::pair``, ``std::list``, and ``std::vector`` type
686 casters now accept any Python sequence type as input. `rev. 107285
687 <https://github.com/pybind/pybind11/commit/107285>`_.
688
689* Improved CMake Python detection on multi-architecture Linux.
690 `#532 <https://github.com/pybind/pybind11/pull/532>`_.
691
692* Infrastructure to selectively disable or enable parts of the automatically
693 generated docstrings. `#486 <https://github.com/pybind/pybind11/pull/486>`_.
694
695* ``reference`` and ``reference_internal`` are now the default return value
696 properties for static and non-static properties, respectively. `#473
697 <https://github.com/pybind/pybind11/pull/473>`_. (the previous defaults
698 were ``automatic``). `#473 <https://github.com/pybind/pybind11/pull/473>`_.
699
700* Support for ``std::unique_ptr`` with non-default deleters or no deleter at
701 all (``py::nodelete``). `#384 <https://github.com/pybind/pybind11/pull/384>`_.
702
Wenzel Jakob3c796712016-12-23 16:19:36 +0100703* Deprecated ``handle::call()`` method. The new syntax to call Python
704 functions is simply ``handle()``. It can also be invoked explicitly via
Wenzel Jakobd3549d62016-12-23 16:01:04 +0100705 ``handle::operator<X>()``, where ``X`` is an optional return value policy.
706
707* Print more informative error messages when ``make_tuple()`` or ``cast()``
708 fail. `#262 <https://github.com/pybind/pybind11/pull/262>`_.
709
710* Creation of holder types for classes deriving from
711 ``std::enable_shared_from_this<>`` now also works for ``const`` values.
712 `#260 <https://github.com/pybind/pybind11/pull/260>`_.
713
714* ``make_iterator()`` improvements for better compatibility with various
715 types (now uses prefix increment operator); it now also accepts iterators
716 with different begin/end types as long as they are equality comparable.
717 `#247 <https://github.com/pybind/pybind11/pull/247>`_.
718
719* ``arg()`` now accepts a wider range of argument types for default values.
720 `#244 <https://github.com/pybind/pybind11/pull/244>`_.
721
722* Support ``keep_alive`` where the nurse object may be ``None``. `#341
723 <https://github.com/pybind/pybind11/pull/341>`_.
724
725* Added constructors for ``str`` and ``bytes`` from zero-terminated char
726 pointers, and from char pointers and length. Added constructors for ``str``
727 from ``bytes`` and for ``bytes`` from ``str``, which will perform UTF-8
728 decoding/encoding as required.
729
730* Many other improvements of library internals without user-visible changes
731
Wenzel Jakoba720a602016-07-12 18:02:13 +0200732
7331.8.1 (July 12, 2016)
734----------------------
Wenzel Jakobc47d4982016-07-11 23:40:28 +0200735* Fixed a rare but potentially very severe issue when the garbage collector ran
736 during pybind11 type creation.
Wenzel Jakob1cbe7ef2016-06-14 14:55:10 +0200737
Wenzel Jakobf9502152016-06-14 15:00:46 +02007381.8.0 (June 14, 2016)
Wenzel Jakob1cbe7ef2016-06-14 14:55:10 +0200739----------------------
740* Redesigned CMake build system which exports a convenient
741 ``pybind11_add_module`` function to parent projects.
742* ``std::vector<>`` type bindings analogous to Boost.Python's ``indexing_suite``
743* Transparent conversion of sparse and dense Eigen matrices and vectors (``eigen.h``)
744* Added an ``ExtraFlags`` template argument to the NumPy ``array_t<>`` wrapper
745 to disable an enforced cast that may lose precision, e.g. to create overloads
746 for different precisions and complex vs real-valued matrices.
Wenzel Jakob3f200fa2016-05-17 15:35:29 +0200747* Prevent implicit conversion of floating point values to integral types in
748 function arguments
Wenzel Jakob163ac2e2016-05-03 14:16:18 +0200749* Fixed incorrect default return value policy for functions returning a shared
750 pointer
Wenzel Jakob38d8b8c2016-05-31 09:53:28 +0200751* Don't allow registering a type via ``class_`` twice
Wenzel Jakob163ac2e2016-05-03 14:16:18 +0200752* Don't allow casting a ``None`` value into a C++ lvalue reference
753* Fixed a crash in ``enum_::operator==`` that was triggered by the ``help()`` command
754* Improved detection of whether or not custom C++ types can be copy/move-constructed
755* Extended ``str`` type to also work with ``bytes`` instances
Wenzel Jakob1cbe7ef2016-06-14 14:55:10 +0200756* Added a ``"name"_a`` user defined string literal that is equivalent to ``py::arg("name")``.
757* When specifying function arguments via ``py::arg``, the test that verifies
758 the number of arguments now runs at compile time.
Wenzel Jakob163ac2e2016-05-03 14:16:18 +0200759* Added ``[[noreturn]]`` attribute to ``pybind11_fail()`` to quench some
760 compiler warnings
Wenzel Jakob86d825f2016-05-26 13:19:27 +0200761* List function arguments in exception text when the dispatch code cannot find
762 a matching overload
Wenzel Jakob1cbe7ef2016-06-14 14:55:10 +0200763* Added ``PYBIND11_OVERLOAD_NAME`` and ``PYBIND11_OVERLOAD_PURE_NAME`` macros which
Wenzel Jakobf9502152016-06-14 15:00:46 +0200764 can be used to override virtual methods whose name differs in C++ and Python
Wenzel Jakob1cbe7ef2016-06-14 14:55:10 +0200765 (e.g. ``__call__`` and ``operator()``)
Wenzel Jakob163ac2e2016-05-03 14:16:18 +0200766* Various minor ``iterator`` and ``make_iterator()`` improvements
Wenzel Jakob86d825f2016-05-26 13:19:27 +0200767* Transparently support ``__bool__`` on Python 2.x and Python 3.x
768* Fixed issue with destructor of unpickled object not being called
Wenzel Jakob163ac2e2016-05-03 14:16:18 +0200769* Minor CMake build system improvements on Windows
Wenzel Jakob86d825f2016-05-26 13:19:27 +0200770* New ``pybind11::args`` and ``pybind11::kwargs`` types to create functions which
771 take an arbitrary number of arguments and keyword arguments
772* New syntax to call a Python function from C++ using ``*args`` and ``*kwargs``
Wenzel Jakob1cbe7ef2016-06-14 14:55:10 +0200773* The functions ``def_property_*`` now correctly process docstring arguments (these
774 formerly caused a segmentation fault)
775* Many ``mkdoc.py`` improvements (enumerations, template arguments, ``DOC()``
776 macro accepts more arguments)
777* Cygwin support
778* Documentation improvements (pickling support, ``keep_alive``, macro usage)
Wenzel Jakobc4d7ccd2016-04-30 22:00:44 +0200779
Wenzel Jakobe70b2ab2016-04-30 19:58:33 +02007801.7 (April 30, 2016)
Wenzel Jakobbb79d7b2016-04-21 12:23:20 +0200781----------------------
Wenzel Jakob1ac22e32016-04-25 23:25:40 +0200782* Added a new ``move`` return value policy that triggers C++11 move semantics.
Wenzel Jakobdd7ec342016-04-29 10:06:24 +0200783 The automatic return value policy falls back to this case whenever a rvalue
Wenzel Jakob1ac22e32016-04-25 23:25:40 +0200784 reference is encountered
Wenzel Jakobe84f5572016-04-26 23:19:19 +0200785* Significantly more general GIL state routines that are used instead of
786 Python's troublesome ``PyGILState_Ensure`` and ``PyGILState_Release`` API
Wenzel Jakobdd7ec342016-04-29 10:06:24 +0200787* Redesign of opaque types that drastically simplifies their usage
Wenzel Jakobe70b2ab2016-04-30 19:58:33 +0200788* Extended ability to pass values of type ``[const] void *``
Wenzel Jakob1ac22e32016-04-25 23:25:40 +0200789* ``keep_alive`` fix: don't fail when there is no patient
Wenzel Jakobdd7ec342016-04-29 10:06:24 +0200790* ``functional.h``: acquire the GIL before calling a Python function
Wenzel Jakob1ac22e32016-04-25 23:25:40 +0200791* Added Python RAII type wrappers ``none`` and ``iterable``
792* Added ``*args`` and ``*kwargs`` pass-through parameters to
793 ``pybind11.get_include()`` function
Wenzel Jakobdd7ec342016-04-29 10:06:24 +0200794* Iterator improvements and fixes
795* Documentation on return value policies and opaque types improved
Wenzel Jakobbb79d7b2016-04-21 12:23:20 +0200796
Wenzel Jakobe70b2ab2016-04-30 19:58:33 +02007971.6 (April 30, 2016)
798----------------------
799* Skipped due to upload to PyPI gone wrong and inability to recover
800 (https://github.com/pypa/packaging-problems/issues/74)
801
Wenzel Jakobbb79d7b2016-04-21 12:23:20 +02008021.5 (April 21, 2016)
Wenzel Jakob2c5d5602016-04-11 18:46:11 +0200803----------------------
Wenzel Jakobc79dbe42016-04-17 21:54:31 +0200804* For polymorphic types, use RTTI to try to return the closest type registered with pybind11
Wenzel Jakobd7efa4f2016-04-13 13:45:09 +0200805* Pickling support for serializing and unserializing C++ instances to a byte stream in Python
Wenzel Jakobb2825952016-04-13 23:33:00 +0200806* Added a convenience routine ``make_iterator()`` which turns a range indicated
807 by a pair of C++ iterators into a iterable Python object
808* Added ``len()`` and a variadic ``make_tuple()`` function
Wenzel Jakobb2b44a92016-04-15 17:50:40 +0200809* Addressed a rare issue that could confuse the current virtual function
810 dispatcher and another that could lead to crashes in multi-threaded
811 applications
Wenzel Jakobb2825952016-04-13 23:33:00 +0200812* Added a ``get_include()`` function to the Python module that returns the path
813 of the directory containing the installed pybind11 header files
Wenzel Jakob1c329aa2016-04-13 02:37:36 +0200814* Documentation improvements: import issues, symbol visibility, pickling, limitations
Wenzel Jakobdbe43ff2016-04-21 12:21:14 +0200815* Added casting support for ``std::reference_wrapper<>``
Wenzel Jakob2c5d5602016-04-11 18:46:11 +0200816
Wenzel Jakob33c2a042016-04-07 09:06:49 +02008171.4 (April 7, 2016)
Wenzel Jakobd2385e82016-03-08 18:04:43 +0100818--------------------------
Wenzel Jakob81dfd2c2016-03-08 19:40:32 +0100819* Transparent type conversion for ``std::wstring`` and ``wchar_t``
Wenzel Jakob0e6ca592016-04-07 08:49:37 +0200820* Allow passing ``nullptr``-valued strings
Wenzel Jakob34116732016-04-06 17:55:41 +0200821* Transparent passing of ``void *`` pointers using capsules
Wenzel Jakob0e6ca592016-04-07 08:49:37 +0200822* Transparent support for returning values wrapped in ``std::unique_ptr<>``
Wenzel Jakob4e455dd2016-03-09 16:38:28 +0100823* Improved docstring generation for compatibility with Sphinx
Wenzel Jakob34116732016-04-06 17:55:41 +0200824* Nicer debug error message when default parameter construction fails
825* Support for "opaque" types that bypass the transparent conversion layer for STL containers
826* Redesigned type casting interface to avoid ambiguities that could occasionally cause compiler errors
Wenzel Jakob2c5d5602016-04-11 18:46:11 +0200827* Redesigned property implementation; fixes crashes due to an unfortunate default return value policy
Wenzel Jakob4e455dd2016-03-09 16:38:28 +0100828* Anaconda package generation support
Wenzel Jakobd2385e82016-03-08 18:04:43 +0100829
8301.3 (March 8, 2016)
Wenzel Jakob8ed28082016-02-07 17:32:37 +0100831--------------------------
Wenzel Jakobcf2b87a2016-02-22 17:32:44 +0100832
833* Added support for the Intel C++ compiler (v15+)
834* Added support for the STL unordered set/map data structures
Wenzel Jakobd2385e82016-03-08 18:04:43 +0100835* Added support for the STL linked list data structure
Wenzel Jakobcf2b87a2016-02-22 17:32:44 +0100836* NumPy-style broadcasting support in ``pybind11::vectorize``
Wenzel Jakob2c5d5602016-04-11 18:46:11 +0200837* pybind11 now displays more verbose error messages when ``arg::operator=()`` fails
Wenzel Jakobd2385e82016-03-08 18:04:43 +0100838* pybind11 internal data structures now live in a version-dependent namespace to avoid ABI issues
839* Many, many bugfixes involving corner cases and advanced usage
Wenzel Jakob8ed28082016-02-07 17:32:37 +0100840
8411.2 (February 7, 2016)
Wenzel Jakob1ae77fe2016-01-17 22:36:43 +0100842--------------------------
Wenzel Jakob48548ea2016-01-17 22:36:44 +0100843
Wenzel Jakob1ae77fe2016-01-17 22:36:43 +0100844* Optional: efficient generation of function signatures at compile time using C++14
Wenzel Jakob48548ea2016-01-17 22:36:44 +0100845* Switched to a simpler and more general way of dealing with function default
846 arguments. Unused keyword arguments in function calls are now detected and
847 cause errors as expected
Wenzel Jakob1ae77fe2016-01-17 22:36:43 +0100848* New ``keep_alive`` call policy analogous to Boost.Python's ``with_custodian_and_ward``
Wenzel Jakob48548ea2016-01-17 22:36:44 +0100849* New ``pybind11::base<>`` attribute to indicate a subclass relationship
Wenzel Jakob1ae77fe2016-01-17 22:36:43 +0100850* Improved interface for RAII type wrappers in ``pytypes.h``
851* Use RAII type wrappers consistently within pybind11 itself. This
852 fixes various potential refcount leaks when exceptions occur
Wenzel Jakob2c5d5602016-04-11 18:46:11 +0200853* Added new ``bytes`` RAII type wrapper (maps to ``string`` in Python 2.7)
Wenzel Jakob48548ea2016-01-17 22:36:44 +0100854* Made handle and related RAII classes const correct, using them more
855 consistently everywhere now
Wenzel Jakob1ae77fe2016-01-17 22:36:43 +0100856* Got rid of the ugly ``__pybind11__`` attributes on the Python side---they are
857 now stored in a C++ hash table that is not visible in Python
858* Fixed refcount leaks involving NumPy arrays and bound functions
859* Vastly improved handling of shared/smart pointers
860* Removed an unnecessary copy operation in ``pybind11::vectorize``
861* Fixed naming clashes when both pybind11 and NumPy headers are included
862* Added conversions for additional exception types
Wenzel Jakob48548ea2016-01-17 22:36:44 +0100863* Documentation improvements (using multiple extension modules, smart pointers,
864 other minor clarifications)
Wenzel Jakob61587162016-01-18 22:38:52 +0100865* unified infrastructure for parsing variadic arguments in ``class_`` and cpp_function
Wenzel Jakob1ae77fe2016-01-17 22:36:43 +0100866* Fixed license text (was: ZLIB, should have been: 3-clause BSD)
867* Python 3.2 compatibility
Wenzel Jakobcd4e6ae2016-01-29 11:48:40 +0100868* Fixed remaining issues when accessing types in another plugin module
869* Added enum comparison and casting methods
870* Improved SFINAE-based detection of whether types are copy-constructible
871* Eliminated many warnings about unused variables and the use of ``offsetof()``
Wenzel Jakob8ed28082016-02-07 17:32:37 +0100872* Support for ``std::array<>`` conversions
Wenzel Jakob1ae77fe2016-01-17 22:36:43 +0100873
8741.1 (December 7, 2015)
875--------------------------
876
877* Documentation improvements (GIL, wrapping functions, casting, fixed many typos)
878* Generalized conversion of integer types
879* Improved support for casting function objects
880* Improved support for ``std::shared_ptr<>`` conversions
881* Initial support for ``std::set<>`` conversions
882* Fixed type resolution issue for types defined in a separate plugin module
883* Cmake build system improvements
884* Factored out generic functionality to non-templated code (smaller code size)
885* Added a code size / compile time benchmark vs Boost.Python
886* Added an appveyor CI script
887
8881.0 (October 15, 2015)
889------------------------
890* Initial release