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