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