changelog.rst 47 KB

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