changelog.rst revision 14299
111986Sandreas.sandberg@arm.com.. _changelog: 211986Sandreas.sandberg@arm.com 311986Sandreas.sandberg@arm.comChangelog 411986Sandreas.sandberg@arm.com######### 511986Sandreas.sandberg@arm.com 612037Sandreas.sandberg@arm.comStarting with version 1.8.0, pybind11 releases use a `semantic versioning 712037Sandreas.sandberg@arm.com<http://semver.org>`_ policy. 811986Sandreas.sandberg@arm.com 914299Sbbruce@ucdavis.eduv2.4.1 (Sep 20, 2019) 1012391Sjason@lowepower.com----------------------------------------------------- 1112391Sjason@lowepower.com 1214299Sbbruce@ucdavis.edu* Fixed a problem involving implicit conversion from enumerations to integers 1314299Sbbruce@ucdavis.edu on Python 3.8. `1780 <https://github.com/pybind/pybind11/pull/1780>`_. 1414299Sbbruce@ucdavis.edu 1514299Sbbruce@ucdavis.eduv2.4.0 (Sep 19, 2019) 1614299Sbbruce@ucdavis.edu----------------------------------------------------- 1714299Sbbruce@ucdavis.edu 1814299Sbbruce@ucdavis.edu* Try harder to keep pybind11-internal data structures separate when there 1914299Sbbruce@ucdavis.edu are potential ABI incompatibilities. Fixes crashes that occurred when loading 2014299Sbbruce@ucdavis.edu multiple pybind11 extensions that were e.g. compiled by GCC (libstdc++) 2114299Sbbruce@ucdavis.edu and Clang (libc++). 2214299Sbbruce@ucdavis.edu `#1588 <https://github.com/pybind/pybind11/pull/1588>`_ and 2314299Sbbruce@ucdavis.edu `c9f5a <https://github.com/pybind/pybind11/commit/c9f5a>`_. 2414299Sbbruce@ucdavis.edu 2514299Sbbruce@ucdavis.edu* Added support for ``__await__``, ``__aiter__``, and ``__anext__`` protocols. 2614299Sbbruce@ucdavis.edu `#1842 <https://github.com/pybind/pybind11/pull/1842>`_. 2714299Sbbruce@ucdavis.edu 2814299Sbbruce@ucdavis.edu* ``pybind11_add_module()``: don't strip symbols when compiling in 2914299Sbbruce@ucdavis.edu ``RelWithDebInfo`` mode. `#1980 3014299Sbbruce@ucdavis.edu <https://github.com/pybind/pybind11/pull/1980>`_. 3114299Sbbruce@ucdavis.edu 3214299Sbbruce@ucdavis.edu* ``enum_``: Reproduce Python behavior when comparing against invalid values 3314299Sbbruce@ucdavis.edu (e.g. ``None``, strings, etc.). Add back support for ``__invert__()``. 3414299Sbbruce@ucdavis.edu `#1912 <https://github.com/pybind/pybind11/pull/1912>`_, 3514299Sbbruce@ucdavis.edu `#1907 <https://github.com/pybind/pybind11/pull/1907>`_. 3614299Sbbruce@ucdavis.edu 3714299Sbbruce@ucdavis.edu* List insertion operation for ``py::list``. 3814299Sbbruce@ucdavis.edu Added ``.empty()`` to all collection types. 3914299Sbbruce@ucdavis.edu Added ``py::set::contains()`` and ``py::dict::contains()``. 4014299Sbbruce@ucdavis.edu `#1887 <https://github.com/pybind/pybind11/pull/1887>`_, 4114299Sbbruce@ucdavis.edu `#1884 <https://github.com/pybind/pybind11/pull/1884>`_, 4214299Sbbruce@ucdavis.edu `#1888 <https://github.com/pybind/pybind11/pull/1888>`_. 4314299Sbbruce@ucdavis.edu 4414299Sbbruce@ucdavis.edu* ``py::details::overload_cast_impl`` is available in C++11 mode, can be used 4514299Sbbruce@ucdavis.edu like ``overload_cast`` with an additional set of parantheses. 4614299Sbbruce@ucdavis.edu `#1581 <https://github.com/pybind/pybind11/pull/1581>`_. 4714299Sbbruce@ucdavis.edu 4814299Sbbruce@ucdavis.edu* Fixed ``get_include()`` on Conda. 4914299Sbbruce@ucdavis.edu `#1877 <https://github.com/pybind/pybind11/pull/1877>`_. 5014299Sbbruce@ucdavis.edu 5114299Sbbruce@ucdavis.edu* ``stl_bind.h``: negative indexing support. 5214299Sbbruce@ucdavis.edu `#1882 <https://github.com/pybind/pybind11/pull/1882>`_. 5314299Sbbruce@ucdavis.edu 5414299Sbbruce@ucdavis.edu* Minor CMake fix to add MinGW compatibility. 5514299Sbbruce@ucdavis.edu `#1851 <https://github.com/pybind/pybind11/pull/1851>`_. 5614299Sbbruce@ucdavis.edu 5714299Sbbruce@ucdavis.edu* GIL-related fixes. 5814299Sbbruce@ucdavis.edu `#1836 <https://github.com/pybind/pybind11/pull/1836>`_, 5914299Sbbruce@ucdavis.edu `8b90b <https://github.com/pybind/pybind11/commit/8b90b>`_. 6014299Sbbruce@ucdavis.edu 6114299Sbbruce@ucdavis.edu* Other very minor/subtle fixes and improvements. 6214299Sbbruce@ucdavis.edu `#1329 <https://github.com/pybind/pybind11/pull/1329>`_, 6314299Sbbruce@ucdavis.edu `#1910 <https://github.com/pybind/pybind11/pull/1910>`_, 6414299Sbbruce@ucdavis.edu `#1863 <https://github.com/pybind/pybind11/pull/1863>`_, 6514299Sbbruce@ucdavis.edu `#1847 <https://github.com/pybind/pybind11/pull/1847>`_, 6614299Sbbruce@ucdavis.edu `#1890 <https://github.com/pybind/pybind11/pull/1890>`_, 6714299Sbbruce@ucdavis.edu `#1860 <https://github.com/pybind/pybind11/pull/1860>`_, 6814299Sbbruce@ucdavis.edu `#1848 <https://github.com/pybind/pybind11/pull/1848>`_, 6914299Sbbruce@ucdavis.edu `#1821 <https://github.com/pybind/pybind11/pull/1821>`_, 7014299Sbbruce@ucdavis.edu `#1837 <https://github.com/pybind/pybind11/pull/1837>`_, 7114299Sbbruce@ucdavis.edu `#1833 <https://github.com/pybind/pybind11/pull/1833>`_, 7214299Sbbruce@ucdavis.edu `#1748 <https://github.com/pybind/pybind11/pull/1748>`_, 7314299Sbbruce@ucdavis.edu `#1852 <https://github.com/pybind/pybind11/pull/1852>`_. 7414299Sbbruce@ucdavis.edu 7514299Sbbruce@ucdavis.eduv2.3.0 (June 11, 2019) 7614299Sbbruce@ucdavis.edu----------------------------------------------------- 7714299Sbbruce@ucdavis.edu 7814299Sbbruce@ucdavis.edu* Significantly reduced module binary size (10-20%) when compiled in C++11 mode 7914299Sbbruce@ucdavis.edu with GCC/Clang, or in any mode with MSVC. Function signatures are now always 8014299Sbbruce@ucdavis.edu precomputed at compile time (this was previously only available in C++14 mode 8114299Sbbruce@ucdavis.edu for non-MSVC compilers). 8214299Sbbruce@ucdavis.edu `#934 <https://github.com/pybind/pybind11/pull/934>`_. 8314299Sbbruce@ucdavis.edu 8414299Sbbruce@ucdavis.edu* Add basic support for tag-based static polymorphism, where classes 8514299Sbbruce@ucdavis.edu provide a method to returns the desired type of an instance. 8614299Sbbruce@ucdavis.edu `#1326 <https://github.com/pybind/pybind11/pull/1326>`_. 8714299Sbbruce@ucdavis.edu 8814299Sbbruce@ucdavis.edu* Python type wrappers (``py::handle``, ``py::object``, etc.) 8914299Sbbruce@ucdavis.edu now support map Python's number protocol onto C++ arithmetic 9014299Sbbruce@ucdavis.edu operators such as ``operator+``, ``operator/=``, etc. 9114299Sbbruce@ucdavis.edu `#1511 <https://github.com/pybind/pybind11/pull/1511>`_. 9214299Sbbruce@ucdavis.edu 9314299Sbbruce@ucdavis.edu* A number of improvements related to enumerations: 9414299Sbbruce@ucdavis.edu 9514299Sbbruce@ucdavis.edu 1. The ``enum_`` implementation was rewritten from scratch to reduce 9614299Sbbruce@ucdavis.edu code bloat. Rather than instantiating a full implementation for each 9714299Sbbruce@ucdavis.edu enumeration, most code is now contained in a generic base class. 9814299Sbbruce@ucdavis.edu `#1511 <https://github.com/pybind/pybind11/pull/1511>`_. 9914299Sbbruce@ucdavis.edu 10014299Sbbruce@ucdavis.edu 2. The ``value()`` method of ``py::enum_`` now accepts an optional 10114299Sbbruce@ucdavis.edu docstring that will be shown in the documentation of the associated 10214299Sbbruce@ucdavis.edu enumeration. `#1160 <https://github.com/pybind/pybind11/pull/1160>`_. 10314299Sbbruce@ucdavis.edu 10414299Sbbruce@ucdavis.edu 3. check for already existing enum value and throw an error if present. 10514299Sbbruce@ucdavis.edu `#1453 <https://github.com/pybind/pybind11/pull/1453>`_. 10614299Sbbruce@ucdavis.edu 10714299Sbbruce@ucdavis.edu* Support for over-aligned type allocation via C++17's aligned ``new`` 10814299Sbbruce@ucdavis.edu statement. `#1582 <https://github.com/pybind/pybind11/pull/1582>`_. 10914299Sbbruce@ucdavis.edu 11014299Sbbruce@ucdavis.edu* Added ``py::ellipsis()`` method for slicing of multidimensional NumPy arrays 11114299Sbbruce@ucdavis.edu `#1502 <https://github.com/pybind/pybind11/pull/1502>`_. 11214299Sbbruce@ucdavis.edu 11314299Sbbruce@ucdavis.edu* Numerous Improvements to the ``mkdoc.py`` script for extracting documentation 11414299Sbbruce@ucdavis.edu from C++ header files. 11514299Sbbruce@ucdavis.edu `#1788 <https://github.com/pybind/pybind11/pull/1788>`_. 11614299Sbbruce@ucdavis.edu 11714299Sbbruce@ucdavis.edu* ``pybind11_add_module()``: allow including Python as a ``SYSTEM`` include path. 11814299Sbbruce@ucdavis.edu `#1416 <https://github.com/pybind/pybind11/pull/1416>`_. 11914299Sbbruce@ucdavis.edu 12014299Sbbruce@ucdavis.edu* ``pybind11/stl.h`` does not convert strings to ``vector<string>`` anymore. 12114299Sbbruce@ucdavis.edu `#1258 <https://github.com/pybind/pybind11/issues/1258>`_. 12214299Sbbruce@ucdavis.edu 12314299Sbbruce@ucdavis.edu* Mark static methods as such to fix auto-generated Sphinx documentation. 12414299Sbbruce@ucdavis.edu `#1732 <https://github.com/pybind/pybind11/pull/1732>`_. 12514299Sbbruce@ucdavis.edu 12614299Sbbruce@ucdavis.edu* Re-throw forced unwind exceptions (e.g. during pthread termination). 12714299Sbbruce@ucdavis.edu `#1208 <https://github.com/pybind/pybind11/pull/1208>`_. 12814299Sbbruce@ucdavis.edu 12914299Sbbruce@ucdavis.edu* Added ``__contains__`` method to the bindings of maps (``std::map``, 13014299Sbbruce@ucdavis.edu ``std::unordered_map``). 13114299Sbbruce@ucdavis.edu `#1767 <https://github.com/pybind/pybind11/pull/1767>`_. 13214299Sbbruce@ucdavis.edu 13314299Sbbruce@ucdavis.edu* Improvements to ``gil_scoped_acquire``. 13414299Sbbruce@ucdavis.edu `#1211 <https://github.com/pybind/pybind11/pull/1211>`_. 13514299Sbbruce@ucdavis.edu 13614299Sbbruce@ucdavis.edu* Type caster support for ``std::deque<T>``. 13714299Sbbruce@ucdavis.edu `#1609 <https://github.com/pybind/pybind11/pull/1609>`_. 13814299Sbbruce@ucdavis.edu 13914299Sbbruce@ucdavis.edu* Support for ``std::unique_ptr`` holders, whose deleters differ between a base and derived 14014299Sbbruce@ucdavis.edu class. `#1353 <https://github.com/pybind/pybind11/pull/1353>`_. 14114299Sbbruce@ucdavis.edu 14214299Sbbruce@ucdavis.edu* Construction of STL array/vector-like data structures from 14314299Sbbruce@ucdavis.edu iterators. Added an ``extend()`` operation. 14414299Sbbruce@ucdavis.edu `#1709 <https://github.com/pybind/pybind11/pull/1709>`_, 14514299Sbbruce@ucdavis.edu 14614299Sbbruce@ucdavis.edu* CMake build system improvements for projects that include non-C++ 14714299Sbbruce@ucdavis.edu files (e.g. plain C, CUDA) in ``pybind11_add_module`` et al. 14814299Sbbruce@ucdavis.edu `#1678 <https://github.com/pybind/pybind11/pull/1678>`_. 14914299Sbbruce@ucdavis.edu 15014299Sbbruce@ucdavis.edu* Fixed asynchronous invocation and deallocation of Python functions 15114299Sbbruce@ucdavis.edu wrapped in ``std::function``. 15214299Sbbruce@ucdavis.edu `#1595 <https://github.com/pybind/pybind11/pull/1595>`_. 15314299Sbbruce@ucdavis.edu 15414299Sbbruce@ucdavis.edu* Fixes regarding return value policy propagation in STL type casters. 15514299Sbbruce@ucdavis.edu `#1603 <https://github.com/pybind/pybind11/pull/1603>`_. 15614299Sbbruce@ucdavis.edu 15714299Sbbruce@ucdavis.edu* Fixed scoped enum comparisons. 15814299Sbbruce@ucdavis.edu `#1571 <https://github.com/pybind/pybind11/pull/1571>`_. 15914299Sbbruce@ucdavis.edu 16014299Sbbruce@ucdavis.edu* Fixed iostream redirection for code that releases the GIL. 16114299Sbbruce@ucdavis.edu `#1368 <https://github.com/pybind/pybind11/pull/1368>`_, 16214299Sbbruce@ucdavis.edu 16314299Sbbruce@ucdavis.edu* A number of CI-related fixes. 16414299Sbbruce@ucdavis.edu `#1757 <https://github.com/pybind/pybind11/pull/1757>`_, 16514299Sbbruce@ucdavis.edu `#1744 <https://github.com/pybind/pybind11/pull/1744>`_, 16614299Sbbruce@ucdavis.edu `#1670 <https://github.com/pybind/pybind11/pull/1670>`_. 16714299Sbbruce@ucdavis.edu 16814299Sbbruce@ucdavis.eduv2.2.4 (September 11, 2018) 16914299Sbbruce@ucdavis.edu----------------------------------------------------- 17014299Sbbruce@ucdavis.edu 17114299Sbbruce@ucdavis.edu* Use new Python 3.7 Thread Specific Storage (TSS) implementation if available. 17214299Sbbruce@ucdavis.edu `#1454 <https://github.com/pybind/pybind11/pull/1454>`_, 17314299Sbbruce@ucdavis.edu `#1517 <https://github.com/pybind/pybind11/pull/1517>`_. 17414299Sbbruce@ucdavis.edu 17514299Sbbruce@ucdavis.edu* Fixes for newer MSVC versions and C++17 mode. 17614299Sbbruce@ucdavis.edu `#1347 <https://github.com/pybind/pybind11/pull/1347>`_, 17714299Sbbruce@ucdavis.edu `#1462 <https://github.com/pybind/pybind11/pull/1462>`_. 17814299Sbbruce@ucdavis.edu 17914299Sbbruce@ucdavis.edu* Propagate return value policies to type-specific casters 18014299Sbbruce@ucdavis.edu when casting STL containers. 18114299Sbbruce@ucdavis.edu `#1455 <https://github.com/pybind/pybind11/pull/1455>`_. 18214299Sbbruce@ucdavis.edu 18314299Sbbruce@ucdavis.edu* Allow ostream-redirection of more than 1024 characters. 18414299Sbbruce@ucdavis.edu `#1479 <https://github.com/pybind/pybind11/pull/1479>`_. 18514299Sbbruce@ucdavis.edu 18614299Sbbruce@ucdavis.edu* Set ``Py_DEBUG`` define when compiling against a debug Python build. 18714299Sbbruce@ucdavis.edu `#1438 <https://github.com/pybind/pybind11/pull/1438>`_. 18814299Sbbruce@ucdavis.edu 18914299Sbbruce@ucdavis.edu* Untangle integer logic in number type caster to work for custom 19014299Sbbruce@ucdavis.edu types that may only be castable to a restricted set of builtin types. 19114299Sbbruce@ucdavis.edu `#1442 <https://github.com/pybind/pybind11/pull/1442>`_. 19214299Sbbruce@ucdavis.edu 19314299Sbbruce@ucdavis.edu* CMake build system: Remember Python version in cache file. 19414299Sbbruce@ucdavis.edu `#1434 <https://github.com/pybind/pybind11/pull/1434>`_. 19514299Sbbruce@ucdavis.edu 19614299Sbbruce@ucdavis.edu* Fix for custom smart pointers: use ``std::addressof`` to obtain holder 19714299Sbbruce@ucdavis.edu address instead of ``operator&``. 19814299Sbbruce@ucdavis.edu `#1435 <https://github.com/pybind/pybind11/pull/1435>`_. 19914299Sbbruce@ucdavis.edu 20014299Sbbruce@ucdavis.edu* Properly report exceptions thrown during module initialization. 20114299Sbbruce@ucdavis.edu `#1362 <https://github.com/pybind/pybind11/pull/1362>`_. 20214299Sbbruce@ucdavis.edu 20314299Sbbruce@ucdavis.edu* Fixed a segmentation fault when creating empty-shaped NumPy array. 20414299Sbbruce@ucdavis.edu `#1371 <https://github.com/pybind/pybind11/pull/1371>`_. 20514299Sbbruce@ucdavis.edu 20614299Sbbruce@ucdavis.edu* The version of Intel C++ compiler must be >= 2017, and this is now checked by 20714299Sbbruce@ucdavis.edu the header files. `#1363 <https://github.com/pybind/pybind11/pull/1363>`_. 20814299Sbbruce@ucdavis.edu 20914299Sbbruce@ucdavis.edu* A few minor typo fixes and improvements to the test suite, and 21014299Sbbruce@ucdavis.edu patches that silence compiler warnings. 21114299Sbbruce@ucdavis.edu 21214299Sbbruce@ucdavis.edu* Vectors now support construction from generators, as well as ``extend()`` from a 21314299Sbbruce@ucdavis.edu list or generator. 21414299Sbbruce@ucdavis.edu `#1496 <https://github.com/pybind/pybind11/pull/1496>`_. 21514299Sbbruce@ucdavis.edu 21614299Sbbruce@ucdavis.edu 21714299Sbbruce@ucdavis.eduv2.2.3 (April 29, 2018) 21814299Sbbruce@ucdavis.edu----------------------------------------------------- 21914299Sbbruce@ucdavis.edu 22014299Sbbruce@ucdavis.edu* The pybind11 header location detection was replaced by a new implementation 22114299Sbbruce@ucdavis.edu that no longer depends on ``pip`` internals (the recently released ``pip`` 22214299Sbbruce@ucdavis.edu 10 has restricted access to this API). 22314299Sbbruce@ucdavis.edu `#1190 <https://github.com/pybind/pybind11/pull/1190>`_. 22414299Sbbruce@ucdavis.edu 22514299Sbbruce@ucdavis.edu* Small adjustment to an implementation detail to work around a compiler segmentation fault in Clang 3.3/3.4. 22614299Sbbruce@ucdavis.edu `#1350 <https://github.com/pybind/pybind11/pull/1350>`_. 22714299Sbbruce@ucdavis.edu 22814299Sbbruce@ucdavis.edu* The minimal supported version of the Intel compiler was >= 17.0 since 22914299Sbbruce@ucdavis.edu pybind11 v2.1. This check is now explicit, and a compile-time error is raised 23014299Sbbruce@ucdavis.edu if the compiler meet the requirement. 23114299Sbbruce@ucdavis.edu `#1363 <https://github.com/pybind/pybind11/pull/1363>`_. 23214299Sbbruce@ucdavis.edu 23314299Sbbruce@ucdavis.edu* Fixed an endianness-related fault in the test suite. 23414299Sbbruce@ucdavis.edu `#1287 <https://github.com/pybind/pybind11/pull/1287>`_. 23514299Sbbruce@ucdavis.edu 23614299Sbbruce@ucdavis.eduv2.2.2 (February 7, 2018) 23714299Sbbruce@ucdavis.edu----------------------------------------------------- 23814299Sbbruce@ucdavis.edu 23914299Sbbruce@ucdavis.edu* Fixed a segfault when combining embedded interpreter 24014299Sbbruce@ucdavis.edu shutdown/reinitialization with external loaded pybind11 modules. 24114299Sbbruce@ucdavis.edu `#1092 <https://github.com/pybind/pybind11/pull/1092>`_. 24214299Sbbruce@ucdavis.edu 24314299Sbbruce@ucdavis.edu* Eigen support: fixed a bug where Nx1/1xN numpy inputs couldn't be passed as 24414299Sbbruce@ucdavis.edu arguments to Eigen vectors (which for Eigen are simply compile-time fixed 24514299Sbbruce@ucdavis.edu Nx1/1xN matrices). 24614299Sbbruce@ucdavis.edu `#1106 <https://github.com/pybind/pybind11/pull/1106>`_. 24714299Sbbruce@ucdavis.edu 24814299Sbbruce@ucdavis.edu* Clarified to license by moving the licensing of contributions from 24914299Sbbruce@ucdavis.edu ``LICENSE`` into ``CONTRIBUTING.md``: the licensing of contributions is not 25014299Sbbruce@ucdavis.edu actually part of the software license as distributed. This isn't meant to be 25114299Sbbruce@ucdavis.edu a substantial change in the licensing of the project, but addresses concerns 25214299Sbbruce@ucdavis.edu that the clause made the license non-standard. 25314299Sbbruce@ucdavis.edu `#1109 <https://github.com/pybind/pybind11/issues/1109>`_. 25414299Sbbruce@ucdavis.edu 25514299Sbbruce@ucdavis.edu* Fixed a regression introduced in 2.1 that broke binding functions with lvalue 25614299Sbbruce@ucdavis.edu character literal arguments. 25714299Sbbruce@ucdavis.edu `#1128 <https://github.com/pybind/pybind11/pull/1128>`_. 25814299Sbbruce@ucdavis.edu 25914299Sbbruce@ucdavis.edu* MSVC: fix for compilation failures under /permissive-, and added the flag to 26014299Sbbruce@ucdavis.edu the appveyor test suite. 26114299Sbbruce@ucdavis.edu `#1155 <https://github.com/pybind/pybind11/pull/1155>`_. 26214299Sbbruce@ucdavis.edu 26314299Sbbruce@ucdavis.edu* Fixed ``__qualname__`` generation, and in turn, fixes how class names 26414299Sbbruce@ucdavis.edu (especially nested class names) are shown in generated docstrings. 26514299Sbbruce@ucdavis.edu `#1171 <https://github.com/pybind/pybind11/pull/1171>`_. 26614299Sbbruce@ucdavis.edu 26714299Sbbruce@ucdavis.edu* Updated the FAQ with a suggested project citation reference. 26814299Sbbruce@ucdavis.edu `#1189 <https://github.com/pybind/pybind11/pull/1189>`_. 26914299Sbbruce@ucdavis.edu 27014299Sbbruce@ucdavis.edu* Added fixes for deprecation warnings when compiled under C++17 with 27114299Sbbruce@ucdavis.edu ``-Wdeprecated`` turned on, and add ``-Wdeprecated`` to the test suite 27214299Sbbruce@ucdavis.edu compilation flags. 27314299Sbbruce@ucdavis.edu `#1191 <https://github.com/pybind/pybind11/pull/1191>`_. 27414299Sbbruce@ucdavis.edu 27514299Sbbruce@ucdavis.edu* Fixed outdated PyPI URLs in ``setup.py``. 27614299Sbbruce@ucdavis.edu `#1213 <https://github.com/pybind/pybind11/pull/1213>`_. 27714299Sbbruce@ucdavis.edu 27814299Sbbruce@ucdavis.edu* Fixed a refcount leak for arguments that end up in a ``py::args`` argument 27914299Sbbruce@ucdavis.edu for functions with both fixed positional and ``py::args`` arguments. 28014299Sbbruce@ucdavis.edu `#1216 <https://github.com/pybind/pybind11/pull/1216>`_. 28114299Sbbruce@ucdavis.edu 28214299Sbbruce@ucdavis.edu* Fixed a potential segfault resulting from possible premature destruction of 28314299Sbbruce@ucdavis.edu ``py::args``/``py::kwargs`` arguments with overloaded functions. 28414299Sbbruce@ucdavis.edu `#1223 <https://github.com/pybind/pybind11/pull/1223>`_. 28514299Sbbruce@ucdavis.edu 28614299Sbbruce@ucdavis.edu* Fixed ``del map[item]`` for a ``stl_bind.h`` bound stl map. 28714299Sbbruce@ucdavis.edu `#1229 <https://github.com/pybind/pybind11/pull/1229>`_. 28814299Sbbruce@ucdavis.edu 28914299Sbbruce@ucdavis.edu* Fixed a regression from v2.1.x where the aggregate initialization could 29014299Sbbruce@ucdavis.edu unintentionally end up at a constructor taking a templated 29114299Sbbruce@ucdavis.edu ``std::initializer_list<T>`` argument. 29214299Sbbruce@ucdavis.edu `#1249 <https://github.com/pybind/pybind11/pull/1249>`_. 29314299Sbbruce@ucdavis.edu 29414299Sbbruce@ucdavis.edu* Fixed an issue where calling a function with a keep_alive policy on the same 29514299Sbbruce@ucdavis.edu nurse/patient pair would cause the internal patient storage to needlessly 29614299Sbbruce@ucdavis.edu grow (unboundedly, if the nurse is long-lived). 29714299Sbbruce@ucdavis.edu `#1251 <https://github.com/pybind/pybind11/issues/1251>`_. 29814299Sbbruce@ucdavis.edu 29914299Sbbruce@ucdavis.edu* Various other minor fixes. 30012391Sjason@lowepower.com 30112391Sjason@lowepower.comv2.2.1 (September 14, 2017) 30212391Sjason@lowepower.com----------------------------------------------------- 30312391Sjason@lowepower.com 30412391Sjason@lowepower.com* Added ``py::module::reload()`` member function for reloading a module. 30512391Sjason@lowepower.com `#1040 <https://github.com/pybind/pybind11/pull/1040>`_. 30612391Sjason@lowepower.com 30712391Sjason@lowepower.com* Fixed a reference leak in the number converter. 30812391Sjason@lowepower.com `#1078 <https://github.com/pybind/pybind11/pull/1078>`_. 30912391Sjason@lowepower.com 31012391Sjason@lowepower.com* Fixed compilation with Clang on host GCC < 5 (old libstdc++ which isn't fully 31112391Sjason@lowepower.com C++11 compliant). `#1062 <https://github.com/pybind/pybind11/pull/1062>`_. 31212391Sjason@lowepower.com 31312391Sjason@lowepower.com* Fixed a regression where the automatic ``std::vector<bool>`` caster would 31412391Sjason@lowepower.com fail to compile. The same fix also applies to any container which returns 31512391Sjason@lowepower.com element proxies instead of references. 31612391Sjason@lowepower.com `#1053 <https://github.com/pybind/pybind11/pull/1053>`_. 31712391Sjason@lowepower.com 31812391Sjason@lowepower.com* Fixed a regression where the ``py::keep_alive`` policy could not be applied 31912391Sjason@lowepower.com to constructors. `#1065 <https://github.com/pybind/pybind11/pull/1065>`_. 32012391Sjason@lowepower.com 32112391Sjason@lowepower.com* Fixed a nullptr dereference when loading a ``py::module_local`` type 32212391Sjason@lowepower.com that's only registered in an external module. 32312391Sjason@lowepower.com `#1058 <https://github.com/pybind/pybind11/pull/1058>`_. 32412391Sjason@lowepower.com 32512391Sjason@lowepower.com* Fixed implicit conversion of accessors to types derived from ``py::object``. 32612391Sjason@lowepower.com `#1076 <https://github.com/pybind/pybind11/pull/1076>`_. 32712391Sjason@lowepower.com 32812391Sjason@lowepower.com* The ``name`` in ``PYBIND11_MODULE(name, variable)`` can now be a macro. 32912391Sjason@lowepower.com `#1082 <https://github.com/pybind/pybind11/pull/1082>`_. 33012391Sjason@lowepower.com 33112391Sjason@lowepower.com* Relaxed overly strict ``py::pickle()`` check for matching get and set types. 33212391Sjason@lowepower.com `#1064 <https://github.com/pybind/pybind11/pull/1064>`_. 33312391Sjason@lowepower.com 33412391Sjason@lowepower.com* Conversion errors now try to be more informative when it's likely that 33512391Sjason@lowepower.com a missing header is the cause (e.g. forgetting ``<pybind11/stl.h>``). 33612391Sjason@lowepower.com `#1077 <https://github.com/pybind/pybind11/pull/1077>`_. 33712391Sjason@lowepower.com 33812391Sjason@lowepower.comv2.2.0 (August 31, 2017) 33912391Sjason@lowepower.com----------------------------------------------------- 34012391Sjason@lowepower.com 34112391Sjason@lowepower.com* Support for embedding the Python interpreter. See the 34212391Sjason@lowepower.com :doc:`documentation page </advanced/embedding>` for a 34312391Sjason@lowepower.com full overview of the new features. 34412391Sjason@lowepower.com `#774 <https://github.com/pybind/pybind11/pull/774>`_, 34512391Sjason@lowepower.com `#889 <https://github.com/pybind/pybind11/pull/889>`_, 34612391Sjason@lowepower.com `#892 <https://github.com/pybind/pybind11/pull/892>`_, 34712391Sjason@lowepower.com `#920 <https://github.com/pybind/pybind11/pull/920>`_. 34812391Sjason@lowepower.com 34912391Sjason@lowepower.com .. code-block:: cpp 35012391Sjason@lowepower.com 35112391Sjason@lowepower.com #include <pybind11/embed.h> 35212391Sjason@lowepower.com namespace py = pybind11; 35312391Sjason@lowepower.com 35412391Sjason@lowepower.com int main() { 35512391Sjason@lowepower.com py::scoped_interpreter guard{}; // start the interpreter and keep it alive 35612391Sjason@lowepower.com 35712391Sjason@lowepower.com py::print("Hello, World!"); // use the Python API 35812391Sjason@lowepower.com } 35912391Sjason@lowepower.com 36012391Sjason@lowepower.com* Support for inheriting from multiple C++ bases in Python. 36112391Sjason@lowepower.com `#693 <https://github.com/pybind/pybind11/pull/693>`_. 36212391Sjason@lowepower.com 36312391Sjason@lowepower.com .. code-block:: python 36412391Sjason@lowepower.com 36512391Sjason@lowepower.com from cpp_module import CppBase1, CppBase2 36612391Sjason@lowepower.com 36712391Sjason@lowepower.com class PyDerived(CppBase1, CppBase2): 36812391Sjason@lowepower.com def __init__(self): 36912391Sjason@lowepower.com CppBase1.__init__(self) # C++ bases must be initialized explicitly 37012391Sjason@lowepower.com CppBase2.__init__(self) 37112391Sjason@lowepower.com 37212391Sjason@lowepower.com* ``PYBIND11_MODULE`` is now the preferred way to create module entry points. 37312391Sjason@lowepower.com ``PYBIND11_PLUGIN`` is deprecated. See :ref:`macros` for details. 37412391Sjason@lowepower.com `#879 <https://github.com/pybind/pybind11/pull/879>`_. 37512391Sjason@lowepower.com 37612391Sjason@lowepower.com .. code-block:: cpp 37712391Sjason@lowepower.com 37812391Sjason@lowepower.com // new 37912391Sjason@lowepower.com PYBIND11_MODULE(example, m) { 38012391Sjason@lowepower.com m.def("add", [](int a, int b) { return a + b; }); 38112391Sjason@lowepower.com } 38212391Sjason@lowepower.com 38312391Sjason@lowepower.com // old 38412391Sjason@lowepower.com PYBIND11_PLUGIN(example) { 38512391Sjason@lowepower.com py::module m("example"); 38612391Sjason@lowepower.com m.def("add", [](int a, int b) { return a + b; }); 38712391Sjason@lowepower.com return m.ptr(); 38812391Sjason@lowepower.com } 38912391Sjason@lowepower.com 39012391Sjason@lowepower.com* pybind11's headers and build system now more strictly enforce hidden symbol 39112391Sjason@lowepower.com visibility for extension modules. This should be seamless for most users, 39212391Sjason@lowepower.com but see the :doc:`upgrade` if you use a custom build system. 39312391Sjason@lowepower.com `#995 <https://github.com/pybind/pybind11/pull/995>`_. 39412391Sjason@lowepower.com 39512391Sjason@lowepower.com* Support for ``py::module_local`` types which allow multiple modules to 39612391Sjason@lowepower.com export the same C++ types without conflicts. This is useful for opaque 39712391Sjason@lowepower.com types like ``std::vector<int>``. ``py::bind_vector`` and ``py::bind_map`` 39812391Sjason@lowepower.com now default to ``py::module_local`` if their elements are builtins or 39912391Sjason@lowepower.com local types. See :ref:`module_local` for details. 40012391Sjason@lowepower.com `#949 <https://github.com/pybind/pybind11/pull/949>`_, 40112391Sjason@lowepower.com `#981 <https://github.com/pybind/pybind11/pull/981>`_, 40212391Sjason@lowepower.com `#995 <https://github.com/pybind/pybind11/pull/995>`_, 40312391Sjason@lowepower.com `#997 <https://github.com/pybind/pybind11/pull/997>`_. 40412391Sjason@lowepower.com 40512391Sjason@lowepower.com* Custom constructors can now be added very easily using lambdas or factory 40612391Sjason@lowepower.com functions which return a class instance by value, pointer or holder. This 40712391Sjason@lowepower.com supersedes the old placement-new ``__init__`` technique. 40812391Sjason@lowepower.com See :ref:`custom_constructors` for details. 40912391Sjason@lowepower.com `#805 <https://github.com/pybind/pybind11/pull/805>`_, 41012391Sjason@lowepower.com `#1014 <https://github.com/pybind/pybind11/pull/1014>`_. 41112391Sjason@lowepower.com 41212391Sjason@lowepower.com .. code-block:: cpp 41312391Sjason@lowepower.com 41412391Sjason@lowepower.com struct Example { 41512391Sjason@lowepower.com Example(std::string); 41612391Sjason@lowepower.com }; 41712391Sjason@lowepower.com 41812391Sjason@lowepower.com py::class_<Example>(m, "Example") 41912391Sjason@lowepower.com .def(py::init<std::string>()) // existing constructor 42012391Sjason@lowepower.com .def(py::init([](int n) { // custom constructor 42112391Sjason@lowepower.com return std::make_unique<Example>(std::to_string(n)); 42212391Sjason@lowepower.com })); 42312391Sjason@lowepower.com 42412391Sjason@lowepower.com* Similarly to custom constructors, pickling support functions are now bound 42512391Sjason@lowepower.com using the ``py::pickle()`` adaptor which improves type safety. See the 42612391Sjason@lowepower.com :doc:`upgrade` and :ref:`pickling` for details. 42712391Sjason@lowepower.com `#1038 <https://github.com/pybind/pybind11/pull/1038>`_. 42812391Sjason@lowepower.com 42912391Sjason@lowepower.com* Builtin support for converting C++17 standard library types and general 43012391Sjason@lowepower.com conversion improvements: 43112391Sjason@lowepower.com 43212391Sjason@lowepower.com 1. C++17 ``std::variant`` is supported right out of the box. C++11/14 43312391Sjason@lowepower.com equivalents (e.g. ``boost::variant``) can also be added with a simple 43412391Sjason@lowepower.com user-defined specialization. See :ref:`cpp17_container_casters` for details. 43512391Sjason@lowepower.com `#811 <https://github.com/pybind/pybind11/pull/811>`_, 43612391Sjason@lowepower.com `#845 <https://github.com/pybind/pybind11/pull/845>`_, 43712391Sjason@lowepower.com `#989 <https://github.com/pybind/pybind11/pull/989>`_. 43812391Sjason@lowepower.com 43912391Sjason@lowepower.com 2. Out-of-the-box support for C++17 ``std::string_view``. 44012391Sjason@lowepower.com `#906 <https://github.com/pybind/pybind11/pull/906>`_. 44112391Sjason@lowepower.com 44212391Sjason@lowepower.com 3. Improved compatibility of the builtin ``optional`` converter. 44312391Sjason@lowepower.com `#874 <https://github.com/pybind/pybind11/pull/874>`_. 44412391Sjason@lowepower.com 44512391Sjason@lowepower.com 4. The ``bool`` converter now accepts ``numpy.bool_`` and types which 44612391Sjason@lowepower.com define ``__bool__`` (Python 3.x) or ``__nonzero__`` (Python 2.7). 44712391Sjason@lowepower.com `#925 <https://github.com/pybind/pybind11/pull/925>`_. 44812391Sjason@lowepower.com 44912391Sjason@lowepower.com 5. C++-to-Python casters are now more efficient and move elements out 45012391Sjason@lowepower.com of rvalue containers whenever possible. 45112391Sjason@lowepower.com `#851 <https://github.com/pybind/pybind11/pull/851>`_, 45212391Sjason@lowepower.com `#936 <https://github.com/pybind/pybind11/pull/936>`_, 45312391Sjason@lowepower.com `#938 <https://github.com/pybind/pybind11/pull/938>`_. 45412391Sjason@lowepower.com 45512391Sjason@lowepower.com 6. Fixed ``bytes`` to ``std::string/char*`` conversion on Python 3. 45612391Sjason@lowepower.com `#817 <https://github.com/pybind/pybind11/pull/817>`_. 45712391Sjason@lowepower.com 45812391Sjason@lowepower.com 7. Fixed lifetime of temporary C++ objects created in Python-to-C++ conversions. 45912391Sjason@lowepower.com `#924 <https://github.com/pybind/pybind11/pull/924>`_. 46012391Sjason@lowepower.com 46112391Sjason@lowepower.com* Scope guard call policy for RAII types, e.g. ``py::call_guard<py::gil_scoped_release>()``, 46212391Sjason@lowepower.com ``py::call_guard<py::scoped_ostream_redirect>()``. See :ref:`call_policies` for details. 46312391Sjason@lowepower.com `#740 <https://github.com/pybind/pybind11/pull/740>`_. 46412391Sjason@lowepower.com 46512391Sjason@lowepower.com* Utility for redirecting C++ streams to Python (e.g. ``std::cout`` -> 46612391Sjason@lowepower.com ``sys.stdout``). Scope guard ``py::scoped_ostream_redirect`` in C++ and 46712391Sjason@lowepower.com a context manager in Python. See :ref:`ostream_redirect`. 46812391Sjason@lowepower.com `#1009 <https://github.com/pybind/pybind11/pull/1009>`_. 46912391Sjason@lowepower.com 47012391Sjason@lowepower.com* Improved handling of types and exceptions across module boundaries. 47112391Sjason@lowepower.com `#915 <https://github.com/pybind/pybind11/pull/915>`_, 47212391Sjason@lowepower.com `#951 <https://github.com/pybind/pybind11/pull/951>`_, 47312391Sjason@lowepower.com `#995 <https://github.com/pybind/pybind11/pull/995>`_. 47412391Sjason@lowepower.com 47512391Sjason@lowepower.com* Fixed destruction order of ``py::keep_alive`` nurse/patient objects 47612391Sjason@lowepower.com in reference cycles. 47712391Sjason@lowepower.com `#856 <https://github.com/pybind/pybind11/pull/856>`_. 47812391Sjason@lowepower.com 47912391Sjason@lowepower.com* Numpy and buffer protocol related improvements: 48012391Sjason@lowepower.com 48112391Sjason@lowepower.com 1. Support for negative strides in Python buffer objects/numpy arrays. This 48212391Sjason@lowepower.com required changing integers from unsigned to signed for the related C++ APIs. 48312391Sjason@lowepower.com Note: If you have compiler warnings enabled, you may notice some new conversion 48412391Sjason@lowepower.com warnings after upgrading. These can be resolved with ``static_cast``. 48512391Sjason@lowepower.com `#782 <https://github.com/pybind/pybind11/pull/782>`_. 48612391Sjason@lowepower.com 48712391Sjason@lowepower.com 2. Support ``std::complex`` and arrays inside ``PYBIND11_NUMPY_DTYPE``. 48812391Sjason@lowepower.com `#831 <https://github.com/pybind/pybind11/pull/831>`_, 48912391Sjason@lowepower.com `#832 <https://github.com/pybind/pybind11/pull/832>`_. 49012391Sjason@lowepower.com 49112391Sjason@lowepower.com 3. Support for constructing ``py::buffer_info`` and ``py::arrays`` using 49212391Sjason@lowepower.com arbitrary containers or iterators instead of requiring a ``std::vector``. 49312391Sjason@lowepower.com `#788 <https://github.com/pybind/pybind11/pull/788>`_, 49412391Sjason@lowepower.com `#822 <https://github.com/pybind/pybind11/pull/822>`_, 49512391Sjason@lowepower.com `#860 <https://github.com/pybind/pybind11/pull/860>`_. 49612391Sjason@lowepower.com 49712391Sjason@lowepower.com 4. Explicitly check numpy version and require >= 1.7.0. 49812391Sjason@lowepower.com `#819 <https://github.com/pybind/pybind11/pull/819>`_. 49912391Sjason@lowepower.com 50012391Sjason@lowepower.com* Support for allowing/prohibiting ``None`` for specific arguments and improved 50112391Sjason@lowepower.com ``None`` overload resolution order. See :ref:`none_arguments` for details. 50212391Sjason@lowepower.com `#843 <https://github.com/pybind/pybind11/pull/843>`_. 50312391Sjason@lowepower.com `#859 <https://github.com/pybind/pybind11/pull/859>`_. 50412391Sjason@lowepower.com 50512391Sjason@lowepower.com* Added ``py::exec()`` as a shortcut for ``py::eval<py::eval_statements>()`` 50612391Sjason@lowepower.com and support for C++11 raw string literals as input. See :ref:`eval`. 50712391Sjason@lowepower.com `#766 <https://github.com/pybind/pybind11/pull/766>`_, 50812391Sjason@lowepower.com `#827 <https://github.com/pybind/pybind11/pull/827>`_. 50912391Sjason@lowepower.com 51012391Sjason@lowepower.com* ``py::vectorize()`` ignores non-vectorizable arguments and supports 51112391Sjason@lowepower.com member functions. 51212391Sjason@lowepower.com `#762 <https://github.com/pybind/pybind11/pull/762>`_. 51312391Sjason@lowepower.com 51412391Sjason@lowepower.com* Support for bound methods as callbacks (``pybind11/functional.h``). 51512391Sjason@lowepower.com `#815 <https://github.com/pybind/pybind11/pull/815>`_. 51612391Sjason@lowepower.com 51712391Sjason@lowepower.com* Allow aliasing pybind11 methods: ``cls.attr("foo") = cls.attr("bar")``. 51812391Sjason@lowepower.com `#802 <https://github.com/pybind/pybind11/pull/802>`_. 51912391Sjason@lowepower.com 52012391Sjason@lowepower.com* Don't allow mixed static/non-static overloads. 52112391Sjason@lowepower.com `#804 <https://github.com/pybind/pybind11/pull/804>`_. 52212391Sjason@lowepower.com 52312391Sjason@lowepower.com* Fixed overriding static properties in derived classes. 52412391Sjason@lowepower.com `#784 <https://github.com/pybind/pybind11/pull/784>`_. 52512391Sjason@lowepower.com 52614299Sbbruce@ucdavis.edu* Added support for write only properties. 52714299Sbbruce@ucdavis.edu `#1144 <https://github.com/pybind/pybind11/pull/1144>`_. 52814299Sbbruce@ucdavis.edu 52912391Sjason@lowepower.com* Improved deduction of member functions of a derived class when its bases 53012391Sjason@lowepower.com aren't registered with pybind11. 53112391Sjason@lowepower.com `#855 <https://github.com/pybind/pybind11/pull/855>`_. 53212391Sjason@lowepower.com 53312391Sjason@lowepower.com .. code-block:: cpp 53412391Sjason@lowepower.com 53512391Sjason@lowepower.com struct Base { 53612391Sjason@lowepower.com int foo() { return 42; } 53712391Sjason@lowepower.com } 53812391Sjason@lowepower.com 53912391Sjason@lowepower.com struct Derived : Base {} 54012391Sjason@lowepower.com 54112391Sjason@lowepower.com // Now works, but previously required also binding `Base` 54212391Sjason@lowepower.com py::class_<Derived>(m, "Derived") 54312391Sjason@lowepower.com .def("foo", &Derived::foo); // function is actually from `Base` 54412391Sjason@lowepower.com 54512391Sjason@lowepower.com* The implementation of ``py::init<>`` now uses C++11 brace initialization 54612391Sjason@lowepower.com syntax to construct instances, which permits binding implicit constructors of 54712391Sjason@lowepower.com aggregate types. `#1015 <https://github.com/pybind/pybind11/pull/1015>`_. 54812391Sjason@lowepower.com 54912391Sjason@lowepower.com .. code-block:: cpp 55012391Sjason@lowepower.com 55112391Sjason@lowepower.com struct Aggregate { 55212391Sjason@lowepower.com int a; 55312391Sjason@lowepower.com std::string b; 55412391Sjason@lowepower.com }; 55512391Sjason@lowepower.com 55612391Sjason@lowepower.com py::class_<Aggregate>(m, "Aggregate") 55712391Sjason@lowepower.com .def(py::init<int, const std::string &>()); 55812391Sjason@lowepower.com 55912391Sjason@lowepower.com* Fixed issues with multiple inheritance with offset base/derived pointers. 56012391Sjason@lowepower.com `#812 <https://github.com/pybind/pybind11/pull/812>`_, 56112391Sjason@lowepower.com `#866 <https://github.com/pybind/pybind11/pull/866>`_, 56212391Sjason@lowepower.com `#960 <https://github.com/pybind/pybind11/pull/960>`_. 56312391Sjason@lowepower.com 56412391Sjason@lowepower.com* Fixed reference leak of type objects. 56512391Sjason@lowepower.com `#1030 <https://github.com/pybind/pybind11/pull/1030>`_. 56612391Sjason@lowepower.com 56712391Sjason@lowepower.com* Improved support for the ``/std:c++14`` and ``/std:c++latest`` modes 56812391Sjason@lowepower.com on MSVC 2017. 56912391Sjason@lowepower.com `#841 <https://github.com/pybind/pybind11/pull/841>`_, 57012391Sjason@lowepower.com `#999 <https://github.com/pybind/pybind11/pull/999>`_. 57112391Sjason@lowepower.com 57212391Sjason@lowepower.com* Fixed detection of private operator new on MSVC. 57312391Sjason@lowepower.com `#893 <https://github.com/pybind/pybind11/pull/893>`_, 57412391Sjason@lowepower.com `#918 <https://github.com/pybind/pybind11/pull/918>`_. 57512391Sjason@lowepower.com 57612391Sjason@lowepower.com* Intel C++ compiler compatibility fixes. 57712391Sjason@lowepower.com `#937 <https://github.com/pybind/pybind11/pull/937>`_. 57812391Sjason@lowepower.com 57912391Sjason@lowepower.com* Fixed implicit conversion of `py::enum_` to integer types on Python 2.7. 58012391Sjason@lowepower.com `#821 <https://github.com/pybind/pybind11/pull/821>`_. 58112391Sjason@lowepower.com 58212391Sjason@lowepower.com* Added ``py::hash`` to fetch the hash value of Python objects, and 58312391Sjason@lowepower.com ``.def(hash(py::self))`` to provide the C++ ``std::hash`` as the Python 58412391Sjason@lowepower.com ``__hash__`` method. 58512391Sjason@lowepower.com `#1034 <https://github.com/pybind/pybind11/pull/1034>`_. 58612391Sjason@lowepower.com 58712391Sjason@lowepower.com* Fixed ``__truediv__`` on Python 2 and ``__itruediv__`` on Python 3. 58812391Sjason@lowepower.com `#867 <https://github.com/pybind/pybind11/pull/867>`_. 58912391Sjason@lowepower.com 59012391Sjason@lowepower.com* ``py::capsule`` objects now support the ``name`` attribute. This is useful 59112391Sjason@lowepower.com for interfacing with ``scipy.LowLevelCallable``. 59212391Sjason@lowepower.com `#902 <https://github.com/pybind/pybind11/pull/902>`_. 59312391Sjason@lowepower.com 59412391Sjason@lowepower.com* Fixed ``py::make_iterator``'s ``__next__()`` for past-the-end calls. 59512391Sjason@lowepower.com `#897 <https://github.com/pybind/pybind11/pull/897>`_. 59612391Sjason@lowepower.com 59712391Sjason@lowepower.com* Added ``error_already_set::matches()`` for checking Python exceptions. 59812391Sjason@lowepower.com `#772 <https://github.com/pybind/pybind11/pull/772>`_. 59912391Sjason@lowepower.com 60012391Sjason@lowepower.com* Deprecated ``py::error_already_set::clear()``. It's no longer needed 60112391Sjason@lowepower.com following a simplification of the ``py::error_already_set`` class. 60212391Sjason@lowepower.com `#954 <https://github.com/pybind/pybind11/pull/954>`_. 60312391Sjason@lowepower.com 60412391Sjason@lowepower.com* Deprecated ``py::handle::operator==()`` in favor of ``py::handle::is()`` 60512391Sjason@lowepower.com `#825 <https://github.com/pybind/pybind11/pull/825>`_. 60612391Sjason@lowepower.com 60712391Sjason@lowepower.com* Deprecated ``py::object::borrowed``/``py::object::stolen``. 60812391Sjason@lowepower.com Use ``py::object::borrowed_t{}``/``py::object::stolen_t{}`` instead. 60912391Sjason@lowepower.com `#771 <https://github.com/pybind/pybind11/pull/771>`_. 61012391Sjason@lowepower.com 61112391Sjason@lowepower.com* Changed internal data structure versioning to avoid conflicts between 61212391Sjason@lowepower.com modules compiled with different revisions of pybind11. 61312391Sjason@lowepower.com `#1012 <https://github.com/pybind/pybind11/pull/1012>`_. 61412391Sjason@lowepower.com 61512391Sjason@lowepower.com* Additional compile-time and run-time error checking and more informative messages. 61612391Sjason@lowepower.com `#786 <https://github.com/pybind/pybind11/pull/786>`_, 61712391Sjason@lowepower.com `#794 <https://github.com/pybind/pybind11/pull/794>`_, 61812391Sjason@lowepower.com `#803 <https://github.com/pybind/pybind11/pull/803>`_. 61912391Sjason@lowepower.com 62012391Sjason@lowepower.com* Various minor improvements and fixes. 62112391Sjason@lowepower.com `#764 <https://github.com/pybind/pybind11/pull/764>`_, 62212391Sjason@lowepower.com `#791 <https://github.com/pybind/pybind11/pull/791>`_, 62312391Sjason@lowepower.com `#795 <https://github.com/pybind/pybind11/pull/795>`_, 62412391Sjason@lowepower.com `#840 <https://github.com/pybind/pybind11/pull/840>`_, 62512391Sjason@lowepower.com `#844 <https://github.com/pybind/pybind11/pull/844>`_, 62612391Sjason@lowepower.com `#846 <https://github.com/pybind/pybind11/pull/846>`_, 62712391Sjason@lowepower.com `#849 <https://github.com/pybind/pybind11/pull/849>`_, 62812391Sjason@lowepower.com `#858 <https://github.com/pybind/pybind11/pull/858>`_, 62912391Sjason@lowepower.com `#862 <https://github.com/pybind/pybind11/pull/862>`_, 63012391Sjason@lowepower.com `#871 <https://github.com/pybind/pybind11/pull/871>`_, 63112391Sjason@lowepower.com `#872 <https://github.com/pybind/pybind11/pull/872>`_, 63212391Sjason@lowepower.com `#881 <https://github.com/pybind/pybind11/pull/881>`_, 63312391Sjason@lowepower.com `#888 <https://github.com/pybind/pybind11/pull/888>`_, 63412391Sjason@lowepower.com `#899 <https://github.com/pybind/pybind11/pull/899>`_, 63512391Sjason@lowepower.com `#928 <https://github.com/pybind/pybind11/pull/928>`_, 63612391Sjason@lowepower.com `#931 <https://github.com/pybind/pybind11/pull/931>`_, 63712391Sjason@lowepower.com `#944 <https://github.com/pybind/pybind11/pull/944>`_, 63812391Sjason@lowepower.com `#950 <https://github.com/pybind/pybind11/pull/950>`_, 63912391Sjason@lowepower.com `#952 <https://github.com/pybind/pybind11/pull/952>`_, 64012391Sjason@lowepower.com `#962 <https://github.com/pybind/pybind11/pull/962>`_, 64112391Sjason@lowepower.com `#965 <https://github.com/pybind/pybind11/pull/965>`_, 64212391Sjason@lowepower.com `#970 <https://github.com/pybind/pybind11/pull/970>`_, 64312391Sjason@lowepower.com `#978 <https://github.com/pybind/pybind11/pull/978>`_, 64412391Sjason@lowepower.com `#979 <https://github.com/pybind/pybind11/pull/979>`_, 64512391Sjason@lowepower.com `#986 <https://github.com/pybind/pybind11/pull/986>`_, 64612391Sjason@lowepower.com `#1020 <https://github.com/pybind/pybind11/pull/1020>`_, 64712391Sjason@lowepower.com `#1027 <https://github.com/pybind/pybind11/pull/1027>`_, 64812391Sjason@lowepower.com `#1037 <https://github.com/pybind/pybind11/pull/1037>`_. 64912391Sjason@lowepower.com 65012391Sjason@lowepower.com* Testing improvements. 65112391Sjason@lowepower.com `#798 <https://github.com/pybind/pybind11/pull/798>`_, 65212391Sjason@lowepower.com `#882 <https://github.com/pybind/pybind11/pull/882>`_, 65312391Sjason@lowepower.com `#898 <https://github.com/pybind/pybind11/pull/898>`_, 65412391Sjason@lowepower.com `#900 <https://github.com/pybind/pybind11/pull/900>`_, 65512391Sjason@lowepower.com `#921 <https://github.com/pybind/pybind11/pull/921>`_, 65612391Sjason@lowepower.com `#923 <https://github.com/pybind/pybind11/pull/923>`_, 65712391Sjason@lowepower.com `#963 <https://github.com/pybind/pybind11/pull/963>`_. 65812037Sandreas.sandberg@arm.com 65912037Sandreas.sandberg@arm.comv2.1.1 (April 7, 2017) 66011986Sandreas.sandberg@arm.com----------------------------------------------------- 66111986Sandreas.sandberg@arm.com 66212037Sandreas.sandberg@arm.com* Fixed minimum version requirement for MSVC 2015u3 66312037Sandreas.sandberg@arm.com `#773 <https://github.com/pybind/pybind11/pull/773>`_. 66411986Sandreas.sandberg@arm.com 66512037Sandreas.sandberg@arm.comv2.1.0 (March 22, 2017) 66612037Sandreas.sandberg@arm.com----------------------------------------------------- 66712037Sandreas.sandberg@arm.com 66812037Sandreas.sandberg@arm.com* pybind11 now performs function overload resolution in two phases. The first 66912037Sandreas.sandberg@arm.com phase only considers exact type matches, while the second allows for implicit 67012037Sandreas.sandberg@arm.com conversions to take place. A special ``noconvert()`` syntax can be used to 67112037Sandreas.sandberg@arm.com completely disable implicit conversions for specific arguments. 67212037Sandreas.sandberg@arm.com `#643 <https://github.com/pybind/pybind11/pull/643>`_, 67312037Sandreas.sandberg@arm.com `#634 <https://github.com/pybind/pybind11/pull/634>`_, 67412037Sandreas.sandberg@arm.com `#650 <https://github.com/pybind/pybind11/pull/650>`_. 67512037Sandreas.sandberg@arm.com 67612037Sandreas.sandberg@arm.com* Fixed a regression where static properties no longer worked with classes 67712037Sandreas.sandberg@arm.com using multiple inheritance. The ``py::metaclass`` attribute is no longer 67812037Sandreas.sandberg@arm.com necessary (and deprecated as of this release) when binding classes with 67912037Sandreas.sandberg@arm.com static properties. 68012037Sandreas.sandberg@arm.com `#679 <https://github.com/pybind/pybind11/pull/679>`_, 68112037Sandreas.sandberg@arm.com 68212037Sandreas.sandberg@arm.com* Classes bound using ``pybind11`` can now use custom metaclasses. 68312037Sandreas.sandberg@arm.com `#679 <https://github.com/pybind/pybind11/pull/679>`_, 68412037Sandreas.sandberg@arm.com 68512037Sandreas.sandberg@arm.com* ``py::args`` and ``py::kwargs`` can now be mixed with other positional 68612037Sandreas.sandberg@arm.com arguments when binding functions using pybind11. 68712037Sandreas.sandberg@arm.com `#611 <https://github.com/pybind/pybind11/pull/611>`_. 68812037Sandreas.sandberg@arm.com 68912037Sandreas.sandberg@arm.com* Improved support for C++11 unicode string and character types; added 69012037Sandreas.sandberg@arm.com extensive documentation regarding pybind11's string conversion behavior. 69112037Sandreas.sandberg@arm.com `#624 <https://github.com/pybind/pybind11/pull/624>`_, 69212037Sandreas.sandberg@arm.com `#636 <https://github.com/pybind/pybind11/pull/636>`_, 69312037Sandreas.sandberg@arm.com `#715 <https://github.com/pybind/pybind11/pull/715>`_. 69412037Sandreas.sandberg@arm.com 69512037Sandreas.sandberg@arm.com* pybind11 can now avoid expensive copies when converting Eigen arrays to NumPy 69612037Sandreas.sandberg@arm.com arrays (and vice versa). `#610 <https://github.com/pybind/pybind11/pull/610>`_. 69712037Sandreas.sandberg@arm.com 69812037Sandreas.sandberg@arm.com* The "fast path" in ``py::vectorize`` now works for any full-size group of C or 69912037Sandreas.sandberg@arm.com F-contiguous arrays. The non-fast path is also faster since it no longer performs 70012037Sandreas.sandberg@arm.com copies of the input arguments (except when type conversions are necessary). 70112037Sandreas.sandberg@arm.com `#610 <https://github.com/pybind/pybind11/pull/610>`_. 70212037Sandreas.sandberg@arm.com 70312037Sandreas.sandberg@arm.com* Added fast, unchecked access to NumPy arrays via a proxy object. 70412037Sandreas.sandberg@arm.com `#746 <https://github.com/pybind/pybind11/pull/746>`_. 70512037Sandreas.sandberg@arm.com 70612037Sandreas.sandberg@arm.com* Transparent support for class-specific ``operator new`` and 70712037Sandreas.sandberg@arm.com ``operator delete`` implementations. 70812037Sandreas.sandberg@arm.com `#755 <https://github.com/pybind/pybind11/pull/755>`_. 70912037Sandreas.sandberg@arm.com 71012037Sandreas.sandberg@arm.com* Slimmer and more efficient STL-compatible iterator interface for sequence types. 71112037Sandreas.sandberg@arm.com `#662 <https://github.com/pybind/pybind11/pull/662>`_. 71212037Sandreas.sandberg@arm.com 71312037Sandreas.sandberg@arm.com* Improved custom holder type support. 71412037Sandreas.sandberg@arm.com `#607 <https://github.com/pybind/pybind11/pull/607>`_. 71512037Sandreas.sandberg@arm.com 71612037Sandreas.sandberg@arm.com* ``nullptr`` to ``None`` conversion fixed in various builtin type casters. 71712037Sandreas.sandberg@arm.com `#732 <https://github.com/pybind/pybind11/pull/732>`_. 71812037Sandreas.sandberg@arm.com 71912037Sandreas.sandberg@arm.com* ``enum_`` now exposes its members via a special ``__members__`` attribute. 72012037Sandreas.sandberg@arm.com `#666 <https://github.com/pybind/pybind11/pull/666>`_. 72112037Sandreas.sandberg@arm.com 72212037Sandreas.sandberg@arm.com* ``std::vector`` bindings created using ``stl_bind.h`` can now optionally 72312037Sandreas.sandberg@arm.com implement the buffer protocol. `#488 <https://github.com/pybind/pybind11/pull/488>`_. 72412037Sandreas.sandberg@arm.com 72512037Sandreas.sandberg@arm.com* Automated C++ reference documentation using doxygen and breathe. 72612037Sandreas.sandberg@arm.com `#598 <https://github.com/pybind/pybind11/pull/598>`_. 72712037Sandreas.sandberg@arm.com 72812037Sandreas.sandberg@arm.com* Added minimum compiler version assertions. 72912037Sandreas.sandberg@arm.com `#727 <https://github.com/pybind/pybind11/pull/727>`_. 73012037Sandreas.sandberg@arm.com 73112037Sandreas.sandberg@arm.com* Improved compatibility with C++1z. 73212037Sandreas.sandberg@arm.com `#677 <https://github.com/pybind/pybind11/pull/677>`_. 73312037Sandreas.sandberg@arm.com 73412037Sandreas.sandberg@arm.com* Improved ``py::capsule`` API. Can be used to implement cleanup 73512037Sandreas.sandberg@arm.com callbacks that are involved at module destruction time. 73612037Sandreas.sandberg@arm.com `#752 <https://github.com/pybind/pybind11/pull/752>`_. 73712037Sandreas.sandberg@arm.com 73812037Sandreas.sandberg@arm.com* Various minor improvements and fixes. 73912037Sandreas.sandberg@arm.com `#595 <https://github.com/pybind/pybind11/pull/595>`_, 74012037Sandreas.sandberg@arm.com `#588 <https://github.com/pybind/pybind11/pull/588>`_, 74112037Sandreas.sandberg@arm.com `#589 <https://github.com/pybind/pybind11/pull/589>`_, 74212037Sandreas.sandberg@arm.com `#603 <https://github.com/pybind/pybind11/pull/603>`_, 74312037Sandreas.sandberg@arm.com `#619 <https://github.com/pybind/pybind11/pull/619>`_, 74412037Sandreas.sandberg@arm.com `#648 <https://github.com/pybind/pybind11/pull/648>`_, 74512037Sandreas.sandberg@arm.com `#695 <https://github.com/pybind/pybind11/pull/695>`_, 74612037Sandreas.sandberg@arm.com `#720 <https://github.com/pybind/pybind11/pull/720>`_, 74712037Sandreas.sandberg@arm.com `#723 <https://github.com/pybind/pybind11/pull/723>`_, 74812037Sandreas.sandberg@arm.com `#729 <https://github.com/pybind/pybind11/pull/729>`_, 74912037Sandreas.sandberg@arm.com `#724 <https://github.com/pybind/pybind11/pull/724>`_, 75012037Sandreas.sandberg@arm.com `#742 <https://github.com/pybind/pybind11/pull/742>`_, 75112037Sandreas.sandberg@arm.com `#753 <https://github.com/pybind/pybind11/pull/753>`_. 75212037Sandreas.sandberg@arm.com 75312037Sandreas.sandberg@arm.comv2.0.1 (Jan 4, 2017) 75412037Sandreas.sandberg@arm.com----------------------------------------------------- 75512037Sandreas.sandberg@arm.com 75612037Sandreas.sandberg@arm.com* Fix pointer to reference error in type_caster on MSVC 75712037Sandreas.sandberg@arm.com `#583 <https://github.com/pybind/pybind11/pull/583>`_. 75812037Sandreas.sandberg@arm.com 75912037Sandreas.sandberg@arm.com* Fixed a segmentation in the test suite due to a typo 76012037Sandreas.sandberg@arm.com `cd7eac <https://github.com/pybind/pybind11/commit/cd7eac>`_. 76112037Sandreas.sandberg@arm.com 76212037Sandreas.sandberg@arm.comv2.0.0 (Jan 1, 2017) 76312037Sandreas.sandberg@arm.com----------------------------------------------------- 76412037Sandreas.sandberg@arm.com 76512037Sandreas.sandberg@arm.com* Fixed a reference counting regression affecting types with custom metaclasses 76612037Sandreas.sandberg@arm.com (introduced in v2.0.0-rc1). 76712037Sandreas.sandberg@arm.com `#571 <https://github.com/pybind/pybind11/pull/571>`_. 76812037Sandreas.sandberg@arm.com 76912037Sandreas.sandberg@arm.com* Quenched a CMake policy warning. 77012037Sandreas.sandberg@arm.com `#570 <https://github.com/pybind/pybind11/pull/570>`_. 77112037Sandreas.sandberg@arm.com 77212037Sandreas.sandberg@arm.comv2.0.0-rc1 (Dec 23, 2016) 77312037Sandreas.sandberg@arm.com----------------------------------------------------- 77412037Sandreas.sandberg@arm.com 77512037Sandreas.sandberg@arm.comThe pybind11 developers are excited to issue a release candidate of pybind11 77612037Sandreas.sandberg@arm.comwith a subsequent v2.0.0 release planned in early January next year. 77712037Sandreas.sandberg@arm.com 77812037Sandreas.sandberg@arm.comAn incredible amount of effort by went into pybind11 over the last ~5 months, 77912037Sandreas.sandberg@arm.comleading to a release that is jam-packed with exciting new features and numerous 78012037Sandreas.sandberg@arm.comusability improvements. The following list links PRs or individual commits 78112037Sandreas.sandberg@arm.comwhenever applicable. 78212037Sandreas.sandberg@arm.com 78312037Sandreas.sandberg@arm.comHappy Christmas! 78412037Sandreas.sandberg@arm.com 78512037Sandreas.sandberg@arm.com* Support for binding C++ class hierarchies that make use of multiple 78612037Sandreas.sandberg@arm.com inheritance. `#410 <https://github.com/pybind/pybind11/pull/410>`_. 78712037Sandreas.sandberg@arm.com 78812037Sandreas.sandberg@arm.com* PyPy support: pybind11 now supports nightly builds of PyPy and will 78912037Sandreas.sandberg@arm.com interoperate with the future 5.7 release. No code changes are necessary, 79012037Sandreas.sandberg@arm.com everything "just" works as usual. Note that we only target the Python 2.7 79112037Sandreas.sandberg@arm.com branch for now; support for 3.x will be added once its ``cpyext`` extension 79212037Sandreas.sandberg@arm.com support catches up. A few minor features remain unsupported for the time 79312037Sandreas.sandberg@arm.com being (notably dynamic attributes in custom types). 79412037Sandreas.sandberg@arm.com `#527 <https://github.com/pybind/pybind11/pull/527>`_. 79512037Sandreas.sandberg@arm.com 79614299Sbbruce@ucdavis.edu* Significant work on the documentation -- in particular, the monolithic 79712037Sandreas.sandberg@arm.com ``advanced.rst`` file was restructured into a easier to read hierarchical 79812037Sandreas.sandberg@arm.com organization. `#448 <https://github.com/pybind/pybind11/pull/448>`_. 79912037Sandreas.sandberg@arm.com 80012037Sandreas.sandberg@arm.com* Many NumPy-related improvements: 80112037Sandreas.sandberg@arm.com 80212037Sandreas.sandberg@arm.com 1. Object-oriented API to access and modify NumPy ``ndarray`` instances, 80312037Sandreas.sandberg@arm.com replicating much of the corresponding NumPy C API functionality. 80412037Sandreas.sandberg@arm.com `#402 <https://github.com/pybind/pybind11/pull/402>`_. 80512037Sandreas.sandberg@arm.com 80612037Sandreas.sandberg@arm.com 2. NumPy array ``dtype`` array descriptors are now first-class citizens and 80712037Sandreas.sandberg@arm.com are exposed via a new class ``py::dtype``. 80812037Sandreas.sandberg@arm.com 80912037Sandreas.sandberg@arm.com 3. Structured dtypes can be registered using the ``PYBIND11_NUMPY_DTYPE()`` 81012037Sandreas.sandberg@arm.com macro. Special ``array`` constructors accepting dtype objects were also 81112037Sandreas.sandberg@arm.com added. 81212037Sandreas.sandberg@arm.com 81312037Sandreas.sandberg@arm.com One potential caveat involving this change: format descriptor strings 81412037Sandreas.sandberg@arm.com should now be accessed via ``format_descriptor::format()`` (however, for 81512037Sandreas.sandberg@arm.com compatibility purposes, the old syntax ``format_descriptor::value`` will 81612037Sandreas.sandberg@arm.com still work for non-structured data types). `#308 81712037Sandreas.sandberg@arm.com <https://github.com/pybind/pybind11/pull/308>`_. 81812037Sandreas.sandberg@arm.com 81912037Sandreas.sandberg@arm.com 4. Further improvements to support structured dtypes throughout the system. 82012037Sandreas.sandberg@arm.com `#472 <https://github.com/pybind/pybind11/pull/472>`_, 82112037Sandreas.sandberg@arm.com `#474 <https://github.com/pybind/pybind11/pull/474>`_, 82212037Sandreas.sandberg@arm.com `#459 <https://github.com/pybind/pybind11/pull/459>`_, 82312037Sandreas.sandberg@arm.com `#453 <https://github.com/pybind/pybind11/pull/453>`_, 82412037Sandreas.sandberg@arm.com `#452 <https://github.com/pybind/pybind11/pull/452>`_, and 82512037Sandreas.sandberg@arm.com `#505 <https://github.com/pybind/pybind11/pull/505>`_. 82612037Sandreas.sandberg@arm.com 82712037Sandreas.sandberg@arm.com 5. Fast access operators. `#497 <https://github.com/pybind/pybind11/pull/497>`_. 82812037Sandreas.sandberg@arm.com 82912037Sandreas.sandberg@arm.com 6. Constructors for arrays whose storage is owned by another object. 83012037Sandreas.sandberg@arm.com `#440 <https://github.com/pybind/pybind11/pull/440>`_. 83112037Sandreas.sandberg@arm.com 83212037Sandreas.sandberg@arm.com 7. Added constructors for ``array`` and ``array_t`` explicitly accepting shape 83312037Sandreas.sandberg@arm.com and strides; if strides are not provided, they are deduced assuming 83412037Sandreas.sandberg@arm.com C-contiguity. Also added simplified constructors for 1-dimensional case. 83512037Sandreas.sandberg@arm.com 83612037Sandreas.sandberg@arm.com 8. Added buffer/NumPy support for ``char[N]`` and ``std::array<char, N>`` types. 83712037Sandreas.sandberg@arm.com 83812037Sandreas.sandberg@arm.com 9. Added ``memoryview`` wrapper type which is constructible from ``buffer_info``. 83912037Sandreas.sandberg@arm.com 84012037Sandreas.sandberg@arm.com* Eigen: many additional conversions and support for non-contiguous 84112037Sandreas.sandberg@arm.com arrays/slices. 84212037Sandreas.sandberg@arm.com `#427 <https://github.com/pybind/pybind11/pull/427>`_, 84312037Sandreas.sandberg@arm.com `#315 <https://github.com/pybind/pybind11/pull/315>`_, 84412037Sandreas.sandberg@arm.com `#316 <https://github.com/pybind/pybind11/pull/316>`_, 84512037Sandreas.sandberg@arm.com `#312 <https://github.com/pybind/pybind11/pull/312>`_, and 84612037Sandreas.sandberg@arm.com `#267 <https://github.com/pybind/pybind11/pull/267>`_ 84712037Sandreas.sandberg@arm.com 84812037Sandreas.sandberg@arm.com* Incompatible changes in ``class_<...>::class_()``: 84912037Sandreas.sandberg@arm.com 85012037Sandreas.sandberg@arm.com 1. Declarations of types that provide access via the buffer protocol must 85112037Sandreas.sandberg@arm.com now include the ``py::buffer_protocol()`` annotation as an argument to 85212037Sandreas.sandberg@arm.com the ``class_`` constructor. 85312037Sandreas.sandberg@arm.com 85412037Sandreas.sandberg@arm.com 2. Declarations of types that require a custom metaclass (i.e. all classes 85512037Sandreas.sandberg@arm.com which include static properties via commands such as 85612037Sandreas.sandberg@arm.com ``def_readwrite_static()``) must now include the ``py::metaclass()`` 85712037Sandreas.sandberg@arm.com annotation as an argument to the ``class_`` constructor. 85812037Sandreas.sandberg@arm.com 85912037Sandreas.sandberg@arm.com These two changes were necessary to make type definitions in pybind11 86012037Sandreas.sandberg@arm.com future-proof, and to support PyPy via its cpyext mechanism. `#527 86112037Sandreas.sandberg@arm.com <https://github.com/pybind/pybind11/pull/527>`_. 86212037Sandreas.sandberg@arm.com 86312037Sandreas.sandberg@arm.com 86414299Sbbruce@ucdavis.edu 3. This version of pybind11 uses a redesigned mechanism for instantiating 86514299Sbbruce@ucdavis.edu trampoline classes that are used to override virtual methods from within 86612037Sandreas.sandberg@arm.com Python. This led to the following user-visible syntax change: instead of 86712037Sandreas.sandberg@arm.com 86812037Sandreas.sandberg@arm.com .. code-block:: cpp 86912037Sandreas.sandberg@arm.com 87012037Sandreas.sandberg@arm.com py::class_<TrampolineClass>("MyClass") 87112037Sandreas.sandberg@arm.com .alias<MyClass>() 87212037Sandreas.sandberg@arm.com .... 87312037Sandreas.sandberg@arm.com 87412037Sandreas.sandberg@arm.com write 87512037Sandreas.sandberg@arm.com 87612037Sandreas.sandberg@arm.com .. code-block:: cpp 87712037Sandreas.sandberg@arm.com 87812037Sandreas.sandberg@arm.com py::class_<MyClass, TrampolineClass>("MyClass") 87912037Sandreas.sandberg@arm.com .... 88012037Sandreas.sandberg@arm.com 88112037Sandreas.sandberg@arm.com Importantly, both the original and the trampoline class are now 88212037Sandreas.sandberg@arm.com specified as an arguments (in arbitrary order) to the ``py::class_`` 88312037Sandreas.sandberg@arm.com template, and the ``alias<..>()`` call is gone. The new scheme has zero 88412037Sandreas.sandberg@arm.com overhead in cases when Python doesn't override any functions of the 88512037Sandreas.sandberg@arm.com underlying C++ class. `rev. 86d825 88612037Sandreas.sandberg@arm.com <https://github.com/pybind/pybind11/commit/86d825>`_. 88712037Sandreas.sandberg@arm.com 88811986Sandreas.sandberg@arm.com* Added ``eval`` and ``eval_file`` functions for evaluating expressions and 88912037Sandreas.sandberg@arm.com statements from a string or file. `rev. 0d3fc3 89012037Sandreas.sandberg@arm.com <https://github.com/pybind/pybind11/commit/0d3fc3>`_. 89112037Sandreas.sandberg@arm.com 89212037Sandreas.sandberg@arm.com* pybind11 can now create types with a modifiable dictionary. 89312037Sandreas.sandberg@arm.com `#437 <https://github.com/pybind/pybind11/pull/437>`_ and 89412037Sandreas.sandberg@arm.com `#444 <https://github.com/pybind/pybind11/pull/444>`_. 89512037Sandreas.sandberg@arm.com 89612037Sandreas.sandberg@arm.com* Support for translation of arbitrary C++ exceptions to Python counterparts. 89712037Sandreas.sandberg@arm.com `#296 <https://github.com/pybind/pybind11/pull/296>`_ and 89812037Sandreas.sandberg@arm.com `#273 <https://github.com/pybind/pybind11/pull/273>`_. 89912037Sandreas.sandberg@arm.com 90012037Sandreas.sandberg@arm.com* Report full backtraces through mixed C++/Python code, better reporting for 90112037Sandreas.sandberg@arm.com import errors, fixed GIL management in exception processing. 90212037Sandreas.sandberg@arm.com `#537 <https://github.com/pybind/pybind11/pull/537>`_, 90312037Sandreas.sandberg@arm.com `#494 <https://github.com/pybind/pybind11/pull/494>`_, 90412037Sandreas.sandberg@arm.com `rev. e72d95 <https://github.com/pybind/pybind11/commit/e72d95>`_, and 90512037Sandreas.sandberg@arm.com `rev. 099d6e <https://github.com/pybind/pybind11/commit/099d6e>`_. 90612037Sandreas.sandberg@arm.com 90712037Sandreas.sandberg@arm.com* Support for bit-level operations, comparisons, and serialization of C++ 90812037Sandreas.sandberg@arm.com enumerations. `#503 <https://github.com/pybind/pybind11/pull/503>`_, 90912037Sandreas.sandberg@arm.com `#508 <https://github.com/pybind/pybind11/pull/508>`_, 91012037Sandreas.sandberg@arm.com `#380 <https://github.com/pybind/pybind11/pull/380>`_, 91112037Sandreas.sandberg@arm.com `#309 <https://github.com/pybind/pybind11/pull/309>`_. 91212037Sandreas.sandberg@arm.com `#311 <https://github.com/pybind/pybind11/pull/311>`_. 91312037Sandreas.sandberg@arm.com 91412037Sandreas.sandberg@arm.com* The ``class_`` constructor now accepts its template arguments in any order. 91512037Sandreas.sandberg@arm.com `#385 <https://github.com/pybind/pybind11/pull/385>`_. 91612037Sandreas.sandberg@arm.com 91712037Sandreas.sandberg@arm.com* Attribute and item accessors now have a more complete interface which makes 91812037Sandreas.sandberg@arm.com it possible to chain attributes as in 91912037Sandreas.sandberg@arm.com ``obj.attr("a")[key].attr("b").attr("method")(1, 2, 3)``. `#425 92012037Sandreas.sandberg@arm.com <https://github.com/pybind/pybind11/pull/425>`_. 92112037Sandreas.sandberg@arm.com 92212037Sandreas.sandberg@arm.com* Major redesign of the default and conversion constructors in ``pytypes.h``. 92312037Sandreas.sandberg@arm.com `#464 <https://github.com/pybind/pybind11/pull/464>`_. 92412037Sandreas.sandberg@arm.com 92512037Sandreas.sandberg@arm.com* Added built-in support for ``std::shared_ptr`` holder type. It is no longer 92612037Sandreas.sandberg@arm.com necessary to to include a declaration of the form 92712037Sandreas.sandberg@arm.com ``PYBIND11_DECLARE_HOLDER_TYPE(T, std::shared_ptr<T>)`` (though continuing to 92812037Sandreas.sandberg@arm.com do so won't cause an error). 92912037Sandreas.sandberg@arm.com `#454 <https://github.com/pybind/pybind11/pull/454>`_. 93012037Sandreas.sandberg@arm.com 93112037Sandreas.sandberg@arm.com* New ``py::overload_cast`` casting operator to select among multiple possible 93212037Sandreas.sandberg@arm.com overloads of a function. An example: 93312037Sandreas.sandberg@arm.com 93412037Sandreas.sandberg@arm.com .. code-block:: cpp 93512037Sandreas.sandberg@arm.com 93612037Sandreas.sandberg@arm.com py::class_<Pet>(m, "Pet") 93712037Sandreas.sandberg@arm.com .def("set", py::overload_cast<int>(&Pet::set), "Set the pet's age") 93812037Sandreas.sandberg@arm.com .def("set", py::overload_cast<const std::string &>(&Pet::set), "Set the pet's name"); 93912037Sandreas.sandberg@arm.com 94012037Sandreas.sandberg@arm.com This feature only works on C++14-capable compilers. 94112037Sandreas.sandberg@arm.com `#541 <https://github.com/pybind/pybind11/pull/541>`_. 94212037Sandreas.sandberg@arm.com 94312037Sandreas.sandberg@arm.com* C++ types are automatically cast to Python types, e.g. when assigning 94412037Sandreas.sandberg@arm.com them as an attribute. For instance, the following is now legal: 94512037Sandreas.sandberg@arm.com 94612037Sandreas.sandberg@arm.com .. code-block:: cpp 94712037Sandreas.sandberg@arm.com 94812037Sandreas.sandberg@arm.com py::module m = /* ... */ 94912037Sandreas.sandberg@arm.com m.attr("constant") = 123; 95012037Sandreas.sandberg@arm.com 95112037Sandreas.sandberg@arm.com (Previously, a ``py::cast`` call was necessary to avoid a compilation error.) 95212037Sandreas.sandberg@arm.com `#551 <https://github.com/pybind/pybind11/pull/551>`_. 95312037Sandreas.sandberg@arm.com 95412037Sandreas.sandberg@arm.com* Redesigned ``pytest``-based test suite. `#321 <https://github.com/pybind/pybind11/pull/321>`_. 95512037Sandreas.sandberg@arm.com 95612037Sandreas.sandberg@arm.com* Instance tracking to detect reference leaks in test suite. `#324 <https://github.com/pybind/pybind11/pull/324>`_ 95712037Sandreas.sandberg@arm.com 95812037Sandreas.sandberg@arm.com* pybind11 can now distinguish between multiple different instances that are 95912037Sandreas.sandberg@arm.com located at the same memory address, but which have different types. 96012037Sandreas.sandberg@arm.com `#329 <https://github.com/pybind/pybind11/pull/329>`_. 96112037Sandreas.sandberg@arm.com 96212037Sandreas.sandberg@arm.com* Improved logic in ``move`` return value policy. 96312037Sandreas.sandberg@arm.com `#510 <https://github.com/pybind/pybind11/pull/510>`_, 96412037Sandreas.sandberg@arm.com `#297 <https://github.com/pybind/pybind11/pull/297>`_. 96512037Sandreas.sandberg@arm.com 96612037Sandreas.sandberg@arm.com* Generalized unpacking API to permit calling Python functions from C++ using 96712037Sandreas.sandberg@arm.com notation such as ``foo(a1, a2, *args, "ka"_a=1, "kb"_a=2, **kwargs)``. `#372 <https://github.com/pybind/pybind11/pull/372>`_. 96812037Sandreas.sandberg@arm.com 96912037Sandreas.sandberg@arm.com* ``py::print()`` function whose behavior matches that of the native Python 97012037Sandreas.sandberg@arm.com ``print()`` function. `#372 <https://github.com/pybind/pybind11/pull/372>`_. 97112037Sandreas.sandberg@arm.com 97212037Sandreas.sandberg@arm.com* Added ``py::dict`` keyword constructor:``auto d = dict("number"_a=42, 97312037Sandreas.sandberg@arm.com "name"_a="World");``. `#372 <https://github.com/pybind/pybind11/pull/372>`_. 97412037Sandreas.sandberg@arm.com 97512037Sandreas.sandberg@arm.com* Added ``py::str::format()`` method and ``_s`` literal: ``py::str s = "1 + 2 97612037Sandreas.sandberg@arm.com = {}"_s.format(3);``. `#372 <https://github.com/pybind/pybind11/pull/372>`_. 97712037Sandreas.sandberg@arm.com 97812037Sandreas.sandberg@arm.com* Added ``py::repr()`` function which is equivalent to Python's builtin 97912037Sandreas.sandberg@arm.com ``repr()``. `#333 <https://github.com/pybind/pybind11/pull/333>`_. 98012037Sandreas.sandberg@arm.com 98112037Sandreas.sandberg@arm.com* Improved construction and destruction logic for holder types. It is now 98212037Sandreas.sandberg@arm.com possible to reference instances with smart pointer holder types without 98312037Sandreas.sandberg@arm.com constructing the holder if desired. The ``PYBIND11_DECLARE_HOLDER_TYPE`` 98412037Sandreas.sandberg@arm.com macro now accepts an optional second parameter to indicate whether the holder 98512037Sandreas.sandberg@arm.com type uses intrusive reference counting. 98612037Sandreas.sandberg@arm.com `#533 <https://github.com/pybind/pybind11/pull/533>`_ and 98712037Sandreas.sandberg@arm.com `#561 <https://github.com/pybind/pybind11/pull/561>`_. 98812037Sandreas.sandberg@arm.com 98912037Sandreas.sandberg@arm.com* Mapping a stateless C++ function to Python and back is now "for free" (i.e. 99012037Sandreas.sandberg@arm.com no extra indirections or argument conversion overheads). `rev. 954b79 99112037Sandreas.sandberg@arm.com <https://github.com/pybind/pybind11/commit/954b79>`_. 99212037Sandreas.sandberg@arm.com 99312037Sandreas.sandberg@arm.com* Bindings for ``std::valarray<T>``. 99412037Sandreas.sandberg@arm.com `#545 <https://github.com/pybind/pybind11/pull/545>`_. 99512037Sandreas.sandberg@arm.com 99612037Sandreas.sandberg@arm.com* Improved support for C++17 capable compilers. 99712037Sandreas.sandberg@arm.com `#562 <https://github.com/pybind/pybind11/pull/562>`_. 99812037Sandreas.sandberg@arm.com 99912037Sandreas.sandberg@arm.com* Bindings for ``std::optional<t>``. 100012037Sandreas.sandberg@arm.com `#475 <https://github.com/pybind/pybind11/pull/475>`_, 100112037Sandreas.sandberg@arm.com `#476 <https://github.com/pybind/pybind11/pull/476>`_, 100212037Sandreas.sandberg@arm.com `#479 <https://github.com/pybind/pybind11/pull/479>`_, 100312037Sandreas.sandberg@arm.com `#499 <https://github.com/pybind/pybind11/pull/499>`_, and 100412037Sandreas.sandberg@arm.com `#501 <https://github.com/pybind/pybind11/pull/501>`_. 100512037Sandreas.sandberg@arm.com 100612037Sandreas.sandberg@arm.com* ``stl_bind.h``: general improvements and support for ``std::map`` and 100712037Sandreas.sandberg@arm.com ``std::unordered_map``. 100812037Sandreas.sandberg@arm.com `#490 <https://github.com/pybind/pybind11/pull/490>`_, 100912037Sandreas.sandberg@arm.com `#282 <https://github.com/pybind/pybind11/pull/282>`_, 101012037Sandreas.sandberg@arm.com `#235 <https://github.com/pybind/pybind11/pull/235>`_. 101112037Sandreas.sandberg@arm.com 101212037Sandreas.sandberg@arm.com* The ``std::tuple``, ``std::pair``, ``std::list``, and ``std::vector`` type 101312037Sandreas.sandberg@arm.com casters now accept any Python sequence type as input. `rev. 107285 101412037Sandreas.sandberg@arm.com <https://github.com/pybind/pybind11/commit/107285>`_. 101512037Sandreas.sandberg@arm.com 101612037Sandreas.sandberg@arm.com* Improved CMake Python detection on multi-architecture Linux. 101712037Sandreas.sandberg@arm.com `#532 <https://github.com/pybind/pybind11/pull/532>`_. 101812037Sandreas.sandberg@arm.com 101912037Sandreas.sandberg@arm.com* Infrastructure to selectively disable or enable parts of the automatically 102012037Sandreas.sandberg@arm.com generated docstrings. `#486 <https://github.com/pybind/pybind11/pull/486>`_. 102112037Sandreas.sandberg@arm.com 102212037Sandreas.sandberg@arm.com* ``reference`` and ``reference_internal`` are now the default return value 102312037Sandreas.sandberg@arm.com properties for static and non-static properties, respectively. `#473 102412037Sandreas.sandberg@arm.com <https://github.com/pybind/pybind11/pull/473>`_. (the previous defaults 102512037Sandreas.sandberg@arm.com were ``automatic``). `#473 <https://github.com/pybind/pybind11/pull/473>`_. 102612037Sandreas.sandberg@arm.com 102712037Sandreas.sandberg@arm.com* Support for ``std::unique_ptr`` with non-default deleters or no deleter at 102812037Sandreas.sandberg@arm.com all (``py::nodelete``). `#384 <https://github.com/pybind/pybind11/pull/384>`_. 102912037Sandreas.sandberg@arm.com 103012037Sandreas.sandberg@arm.com* Deprecated ``handle::call()`` method. The new syntax to call Python 103112037Sandreas.sandberg@arm.com functions is simply ``handle()``. It can also be invoked explicitly via 103212037Sandreas.sandberg@arm.com ``handle::operator<X>()``, where ``X`` is an optional return value policy. 103312037Sandreas.sandberg@arm.com 103412037Sandreas.sandberg@arm.com* Print more informative error messages when ``make_tuple()`` or ``cast()`` 103512037Sandreas.sandberg@arm.com fail. `#262 <https://github.com/pybind/pybind11/pull/262>`_. 103612037Sandreas.sandberg@arm.com 103712037Sandreas.sandberg@arm.com* Creation of holder types for classes deriving from 103812037Sandreas.sandberg@arm.com ``std::enable_shared_from_this<>`` now also works for ``const`` values. 103912037Sandreas.sandberg@arm.com `#260 <https://github.com/pybind/pybind11/pull/260>`_. 104012037Sandreas.sandberg@arm.com 104112037Sandreas.sandberg@arm.com* ``make_iterator()`` improvements for better compatibility with various 104212037Sandreas.sandberg@arm.com types (now uses prefix increment operator); it now also accepts iterators 104312037Sandreas.sandberg@arm.com with different begin/end types as long as they are equality comparable. 104412037Sandreas.sandberg@arm.com `#247 <https://github.com/pybind/pybind11/pull/247>`_. 104512037Sandreas.sandberg@arm.com 104612037Sandreas.sandberg@arm.com* ``arg()`` now accepts a wider range of argument types for default values. 104712037Sandreas.sandberg@arm.com `#244 <https://github.com/pybind/pybind11/pull/244>`_. 104812037Sandreas.sandberg@arm.com 104912037Sandreas.sandberg@arm.com* Support ``keep_alive`` where the nurse object may be ``None``. `#341 105012037Sandreas.sandberg@arm.com <https://github.com/pybind/pybind11/pull/341>`_. 105112037Sandreas.sandberg@arm.com 105212037Sandreas.sandberg@arm.com* Added constructors for ``str`` and ``bytes`` from zero-terminated char 105312037Sandreas.sandberg@arm.com pointers, and from char pointers and length. Added constructors for ``str`` 105412037Sandreas.sandberg@arm.com from ``bytes`` and for ``bytes`` from ``str``, which will perform UTF-8 105512037Sandreas.sandberg@arm.com decoding/encoding as required. 105612037Sandreas.sandberg@arm.com 105712037Sandreas.sandberg@arm.com* Many other improvements of library internals without user-visible changes 105812037Sandreas.sandberg@arm.com 105911986Sandreas.sandberg@arm.com 106011986Sandreas.sandberg@arm.com1.8.1 (July 12, 2016) 106111986Sandreas.sandberg@arm.com---------------------- 106211986Sandreas.sandberg@arm.com* Fixed a rare but potentially very severe issue when the garbage collector ran 106311986Sandreas.sandberg@arm.com during pybind11 type creation. 106411986Sandreas.sandberg@arm.com 106511986Sandreas.sandberg@arm.com1.8.0 (June 14, 2016) 106611986Sandreas.sandberg@arm.com---------------------- 106711986Sandreas.sandberg@arm.com* Redesigned CMake build system which exports a convenient 106811986Sandreas.sandberg@arm.com ``pybind11_add_module`` function to parent projects. 106911986Sandreas.sandberg@arm.com* ``std::vector<>`` type bindings analogous to Boost.Python's ``indexing_suite`` 107011986Sandreas.sandberg@arm.com* Transparent conversion of sparse and dense Eigen matrices and vectors (``eigen.h``) 107111986Sandreas.sandberg@arm.com* Added an ``ExtraFlags`` template argument to the NumPy ``array_t<>`` wrapper 107211986Sandreas.sandberg@arm.com to disable an enforced cast that may lose precision, e.g. to create overloads 107311986Sandreas.sandberg@arm.com for different precisions and complex vs real-valued matrices. 107411986Sandreas.sandberg@arm.com* Prevent implicit conversion of floating point values to integral types in 107511986Sandreas.sandberg@arm.com function arguments 107611986Sandreas.sandberg@arm.com* Fixed incorrect default return value policy for functions returning a shared 107711986Sandreas.sandberg@arm.com pointer 107811986Sandreas.sandberg@arm.com* Don't allow registering a type via ``class_`` twice 107911986Sandreas.sandberg@arm.com* Don't allow casting a ``None`` value into a C++ lvalue reference 108011986Sandreas.sandberg@arm.com* Fixed a crash in ``enum_::operator==`` that was triggered by the ``help()`` command 108111986Sandreas.sandberg@arm.com* Improved detection of whether or not custom C++ types can be copy/move-constructed 108211986Sandreas.sandberg@arm.com* Extended ``str`` type to also work with ``bytes`` instances 108311986Sandreas.sandberg@arm.com* Added a ``"name"_a`` user defined string literal that is equivalent to ``py::arg("name")``. 108411986Sandreas.sandberg@arm.com* When specifying function arguments via ``py::arg``, the test that verifies 108511986Sandreas.sandberg@arm.com the number of arguments now runs at compile time. 108611986Sandreas.sandberg@arm.com* Added ``[[noreturn]]`` attribute to ``pybind11_fail()`` to quench some 108711986Sandreas.sandberg@arm.com compiler warnings 108811986Sandreas.sandberg@arm.com* List function arguments in exception text when the dispatch code cannot find 108911986Sandreas.sandberg@arm.com a matching overload 109011986Sandreas.sandberg@arm.com* Added ``PYBIND11_OVERLOAD_NAME`` and ``PYBIND11_OVERLOAD_PURE_NAME`` macros which 109111986Sandreas.sandberg@arm.com can be used to override virtual methods whose name differs in C++ and Python 109211986Sandreas.sandberg@arm.com (e.g. ``__call__`` and ``operator()``) 109311986Sandreas.sandberg@arm.com* Various minor ``iterator`` and ``make_iterator()`` improvements 109411986Sandreas.sandberg@arm.com* Transparently support ``__bool__`` on Python 2.x and Python 3.x 109511986Sandreas.sandberg@arm.com* Fixed issue with destructor of unpickled object not being called 109611986Sandreas.sandberg@arm.com* Minor CMake build system improvements on Windows 109711986Sandreas.sandberg@arm.com* New ``pybind11::args`` and ``pybind11::kwargs`` types to create functions which 109811986Sandreas.sandberg@arm.com take an arbitrary number of arguments and keyword arguments 109911986Sandreas.sandberg@arm.com* New syntax to call a Python function from C++ using ``*args`` and ``*kwargs`` 110011986Sandreas.sandberg@arm.com* The functions ``def_property_*`` now correctly process docstring arguments (these 110111986Sandreas.sandberg@arm.com formerly caused a segmentation fault) 110211986Sandreas.sandberg@arm.com* Many ``mkdoc.py`` improvements (enumerations, template arguments, ``DOC()`` 110311986Sandreas.sandberg@arm.com macro accepts more arguments) 110411986Sandreas.sandberg@arm.com* Cygwin support 110511986Sandreas.sandberg@arm.com* Documentation improvements (pickling support, ``keep_alive``, macro usage) 110611986Sandreas.sandberg@arm.com 110711986Sandreas.sandberg@arm.com1.7 (April 30, 2016) 110811986Sandreas.sandberg@arm.com---------------------- 110911986Sandreas.sandberg@arm.com* Added a new ``move`` return value policy that triggers C++11 move semantics. 111011986Sandreas.sandberg@arm.com The automatic return value policy falls back to this case whenever a rvalue 111111986Sandreas.sandberg@arm.com reference is encountered 111211986Sandreas.sandberg@arm.com* Significantly more general GIL state routines that are used instead of 111311986Sandreas.sandberg@arm.com Python's troublesome ``PyGILState_Ensure`` and ``PyGILState_Release`` API 111411986Sandreas.sandberg@arm.com* Redesign of opaque types that drastically simplifies their usage 111511986Sandreas.sandberg@arm.com* Extended ability to pass values of type ``[const] void *`` 111611986Sandreas.sandberg@arm.com* ``keep_alive`` fix: don't fail when there is no patient 111711986Sandreas.sandberg@arm.com* ``functional.h``: acquire the GIL before calling a Python function 111811986Sandreas.sandberg@arm.com* Added Python RAII type wrappers ``none`` and ``iterable`` 111911986Sandreas.sandberg@arm.com* Added ``*args`` and ``*kwargs`` pass-through parameters to 112011986Sandreas.sandberg@arm.com ``pybind11.get_include()`` function 112111986Sandreas.sandberg@arm.com* Iterator improvements and fixes 112211986Sandreas.sandberg@arm.com* Documentation on return value policies and opaque types improved 112311986Sandreas.sandberg@arm.com 112411986Sandreas.sandberg@arm.com1.6 (April 30, 2016) 112511986Sandreas.sandberg@arm.com---------------------- 112611986Sandreas.sandberg@arm.com* Skipped due to upload to PyPI gone wrong and inability to recover 112711986Sandreas.sandberg@arm.com (https://github.com/pypa/packaging-problems/issues/74) 112811986Sandreas.sandberg@arm.com 112911986Sandreas.sandberg@arm.com1.5 (April 21, 2016) 113011986Sandreas.sandberg@arm.com---------------------- 113111986Sandreas.sandberg@arm.com* For polymorphic types, use RTTI to try to return the closest type registered with pybind11 113211986Sandreas.sandberg@arm.com* Pickling support for serializing and unserializing C++ instances to a byte stream in Python 113311986Sandreas.sandberg@arm.com* Added a convenience routine ``make_iterator()`` which turns a range indicated 113411986Sandreas.sandberg@arm.com by a pair of C++ iterators into a iterable Python object 113511986Sandreas.sandberg@arm.com* Added ``len()`` and a variadic ``make_tuple()`` function 113611986Sandreas.sandberg@arm.com* Addressed a rare issue that could confuse the current virtual function 113711986Sandreas.sandberg@arm.com dispatcher and another that could lead to crashes in multi-threaded 113811986Sandreas.sandberg@arm.com applications 113911986Sandreas.sandberg@arm.com* Added a ``get_include()`` function to the Python module that returns the path 114011986Sandreas.sandberg@arm.com of the directory containing the installed pybind11 header files 114111986Sandreas.sandberg@arm.com* Documentation improvements: import issues, symbol visibility, pickling, limitations 114211986Sandreas.sandberg@arm.com* Added casting support for ``std::reference_wrapper<>`` 114311986Sandreas.sandberg@arm.com 114411986Sandreas.sandberg@arm.com1.4 (April 7, 2016) 114511986Sandreas.sandberg@arm.com-------------------------- 114611986Sandreas.sandberg@arm.com* Transparent type conversion for ``std::wstring`` and ``wchar_t`` 114711986Sandreas.sandberg@arm.com* Allow passing ``nullptr``-valued strings 114811986Sandreas.sandberg@arm.com* Transparent passing of ``void *`` pointers using capsules 114911986Sandreas.sandberg@arm.com* Transparent support for returning values wrapped in ``std::unique_ptr<>`` 115011986Sandreas.sandberg@arm.com* Improved docstring generation for compatibility with Sphinx 115111986Sandreas.sandberg@arm.com* Nicer debug error message when default parameter construction fails 115211986Sandreas.sandberg@arm.com* Support for "opaque" types that bypass the transparent conversion layer for STL containers 115311986Sandreas.sandberg@arm.com* Redesigned type casting interface to avoid ambiguities that could occasionally cause compiler errors 115411986Sandreas.sandberg@arm.com* Redesigned property implementation; fixes crashes due to an unfortunate default return value policy 115511986Sandreas.sandberg@arm.com* Anaconda package generation support 115611986Sandreas.sandberg@arm.com 115711986Sandreas.sandberg@arm.com1.3 (March 8, 2016) 115811986Sandreas.sandberg@arm.com-------------------------- 115911986Sandreas.sandberg@arm.com 116011986Sandreas.sandberg@arm.com* Added support for the Intel C++ compiler (v15+) 116111986Sandreas.sandberg@arm.com* Added support for the STL unordered set/map data structures 116211986Sandreas.sandberg@arm.com* Added support for the STL linked list data structure 116311986Sandreas.sandberg@arm.com* NumPy-style broadcasting support in ``pybind11::vectorize`` 116411986Sandreas.sandberg@arm.com* pybind11 now displays more verbose error messages when ``arg::operator=()`` fails 116511986Sandreas.sandberg@arm.com* pybind11 internal data structures now live in a version-dependent namespace to avoid ABI issues 116611986Sandreas.sandberg@arm.com* Many, many bugfixes involving corner cases and advanced usage 116711986Sandreas.sandberg@arm.com 116811986Sandreas.sandberg@arm.com1.2 (February 7, 2016) 116911986Sandreas.sandberg@arm.com-------------------------- 117011986Sandreas.sandberg@arm.com 117111986Sandreas.sandberg@arm.com* Optional: efficient generation of function signatures at compile time using C++14 117211986Sandreas.sandberg@arm.com* Switched to a simpler and more general way of dealing with function default 117311986Sandreas.sandberg@arm.com arguments. Unused keyword arguments in function calls are now detected and 117411986Sandreas.sandberg@arm.com cause errors as expected 117511986Sandreas.sandberg@arm.com* New ``keep_alive`` call policy analogous to Boost.Python's ``with_custodian_and_ward`` 117611986Sandreas.sandberg@arm.com* New ``pybind11::base<>`` attribute to indicate a subclass relationship 117711986Sandreas.sandberg@arm.com* Improved interface for RAII type wrappers in ``pytypes.h`` 117811986Sandreas.sandberg@arm.com* Use RAII type wrappers consistently within pybind11 itself. This 117911986Sandreas.sandberg@arm.com fixes various potential refcount leaks when exceptions occur 118011986Sandreas.sandberg@arm.com* Added new ``bytes`` RAII type wrapper (maps to ``string`` in Python 2.7) 118111986Sandreas.sandberg@arm.com* Made handle and related RAII classes const correct, using them more 118211986Sandreas.sandberg@arm.com consistently everywhere now 118311986Sandreas.sandberg@arm.com* Got rid of the ugly ``__pybind11__`` attributes on the Python side---they are 118411986Sandreas.sandberg@arm.com now stored in a C++ hash table that is not visible in Python 118511986Sandreas.sandberg@arm.com* Fixed refcount leaks involving NumPy arrays and bound functions 118611986Sandreas.sandberg@arm.com* Vastly improved handling of shared/smart pointers 118711986Sandreas.sandberg@arm.com* Removed an unnecessary copy operation in ``pybind11::vectorize`` 118811986Sandreas.sandberg@arm.com* Fixed naming clashes when both pybind11 and NumPy headers are included 118911986Sandreas.sandberg@arm.com* Added conversions for additional exception types 119011986Sandreas.sandberg@arm.com* Documentation improvements (using multiple extension modules, smart pointers, 119111986Sandreas.sandberg@arm.com other minor clarifications) 119211986Sandreas.sandberg@arm.com* unified infrastructure for parsing variadic arguments in ``class_`` and cpp_function 119311986Sandreas.sandberg@arm.com* Fixed license text (was: ZLIB, should have been: 3-clause BSD) 119411986Sandreas.sandberg@arm.com* Python 3.2 compatibility 119511986Sandreas.sandberg@arm.com* Fixed remaining issues when accessing types in another plugin module 119611986Sandreas.sandberg@arm.com* Added enum comparison and casting methods 119711986Sandreas.sandberg@arm.com* Improved SFINAE-based detection of whether types are copy-constructible 119811986Sandreas.sandberg@arm.com* Eliminated many warnings about unused variables and the use of ``offsetof()`` 119911986Sandreas.sandberg@arm.com* Support for ``std::array<>`` conversions 120011986Sandreas.sandberg@arm.com 120111986Sandreas.sandberg@arm.com1.1 (December 7, 2015) 120211986Sandreas.sandberg@arm.com-------------------------- 120311986Sandreas.sandberg@arm.com 120411986Sandreas.sandberg@arm.com* Documentation improvements (GIL, wrapping functions, casting, fixed many typos) 120511986Sandreas.sandberg@arm.com* Generalized conversion of integer types 120611986Sandreas.sandberg@arm.com* Improved support for casting function objects 120711986Sandreas.sandberg@arm.com* Improved support for ``std::shared_ptr<>`` conversions 120811986Sandreas.sandberg@arm.com* Initial support for ``std::set<>`` conversions 120911986Sandreas.sandberg@arm.com* Fixed type resolution issue for types defined in a separate plugin module 121011986Sandreas.sandberg@arm.com* Cmake build system improvements 121111986Sandreas.sandberg@arm.com* Factored out generic functionality to non-templated code (smaller code size) 121211986Sandreas.sandberg@arm.com* Added a code size / compile time benchmark vs Boost.Python 121311986Sandreas.sandberg@arm.com* Added an appveyor CI script 121411986Sandreas.sandberg@arm.com 121511986Sandreas.sandberg@arm.com1.0 (October 15, 2015) 121611986Sandreas.sandberg@arm.com------------------------ 121711986Sandreas.sandberg@arm.com* Initial release 1218