changelog.rst revision 11986
111986Sandreas.sandberg@arm.com.. _changelog: 211986Sandreas.sandberg@arm.com 311986Sandreas.sandberg@arm.comChangelog 411986Sandreas.sandberg@arm.com######### 511986Sandreas.sandberg@arm.com 611986Sandreas.sandberg@arm.comStarting with version 1.8, pybind11 releases use a 711986Sandreas.sandberg@arm.com[semantic versioning](http://semver.org) policy. 811986Sandreas.sandberg@arm.com 911986Sandreas.sandberg@arm.comBreaking changes queued for v2.0.0 (Not yet released) 1011986Sandreas.sandberg@arm.com----------------------------------------------------- 1111986Sandreas.sandberg@arm.com* Redesigned virtual call mechanism and user-facing syntax (see 1211986Sandreas.sandberg@arm.com https://github.com/pybind/pybind11/commit/86d825f3302701d81414ddd3d38bcd09433076bc) 1311986Sandreas.sandberg@arm.com 1411986Sandreas.sandberg@arm.com* Remove ``handle.call()`` method 1511986Sandreas.sandberg@arm.com 1611986Sandreas.sandberg@arm.com1.9.0 (Not yet released) 1711986Sandreas.sandberg@arm.com------------------------ 1811986Sandreas.sandberg@arm.com* Queued changes: map indexing suite, documentation for indexing suites. 1911986Sandreas.sandberg@arm.com* Mapping a stateless C++ function to Python and back is now "for free" (i.e. no call overheads) 2011986Sandreas.sandberg@arm.com* Support for translation of arbitrary C++ exceptions to Python counterparts 2111986Sandreas.sandberg@arm.com* Added ``eval`` and ``eval_file`` functions for evaluating expressions and 2211986Sandreas.sandberg@arm.com statements from a string or file 2311986Sandreas.sandberg@arm.com* eigen.h type converter fixed for non-contiguous arrays (e.g. slices) 2411986Sandreas.sandberg@arm.com* Print more informative error messages when ``make_tuple()`` or ``cast()`` fail 2511986Sandreas.sandberg@arm.com* ``std::enable_shared_from_this<>`` now also works for ``const`` values 2611986Sandreas.sandberg@arm.com* A return value policy can now be passed to ``handle::operator()`` 2711986Sandreas.sandberg@arm.com* ``make_iterator()`` improvements for better compatibility with various types 2811986Sandreas.sandberg@arm.com (now uses prefix increment operator); it now also accepts iterators with 2911986Sandreas.sandberg@arm.com different begin/end types as long as they are equality comparable. 3011986Sandreas.sandberg@arm.com* ``arg()`` now accepts a wider range of argument types for default values 3111986Sandreas.sandberg@arm.com* Added ``py::repr()`` function which is equivalent to Python's builtin ``repr()``. 3211986Sandreas.sandberg@arm.com* Added support for registering structured dtypes via ``PYBIND11_NUMPY_DTYPE()`` macro. 3311986Sandreas.sandberg@arm.com* Added ``PYBIND11_STR_TYPE`` macro which maps to the ``builtins.str`` type. 3411986Sandreas.sandberg@arm.com* Added a simplified ``buffer_info`` constructor for 1-dimensional buffers. 3511986Sandreas.sandberg@arm.com* Format descriptor strings should now be accessed via ``format_descriptor::format()`` 3611986Sandreas.sandberg@arm.com (for compatibility purposes, the old syntax ``format_descriptor::value`` will still 3711986Sandreas.sandberg@arm.com work for non-structured data types). 3811986Sandreas.sandberg@arm.com* Added a class wrapping NumPy array descriptors: ``dtype``. 3911986Sandreas.sandberg@arm.com* Added buffer/NumPy support for ``char[N]`` and ``std::array<char, N>`` types. 4011986Sandreas.sandberg@arm.com* ``array`` gained new constructors accepting dtype objects. 4111986Sandreas.sandberg@arm.com* Added constructors for ``array`` and ``array_t`` explicitly accepting shape and 4211986Sandreas.sandberg@arm.com strides; if strides are not provided, they are deduced assuming C-contiguity. 4311986Sandreas.sandberg@arm.com Also added simplified constructors for 1-dimensional case. 4411986Sandreas.sandberg@arm.com* Added constructors for ``str`` from ``bytes`` and for ``bytes`` from ``str``. 4511986Sandreas.sandberg@arm.com This will do the UTF-8 decoding/encoding as required. 4611986Sandreas.sandberg@arm.com* Added constructors for ``str`` and ``bytes`` from zero-terminated char pointers, 4711986Sandreas.sandberg@arm.com and from char pointers and length. 4811986Sandreas.sandberg@arm.com* Added ``memoryview`` wrapper type which is constructible from ``buffer_info``. 4911986Sandreas.sandberg@arm.com* New syntax to call a Python function from C++ using keyword arguments and unpacking, 5011986Sandreas.sandberg@arm.com e.g. ``foo(1, 2, "z"_a=3)`` or ``bar(1, *args, "z"_a=3, **kwargs)``. 5111986Sandreas.sandberg@arm.com* Added ``py::print()`` function which replicates Python's API and writes to Python's 5211986Sandreas.sandberg@arm.com ``sys.stdout`` by default (as opposed to C's ``stdout`` like ``std::cout``). 5311986Sandreas.sandberg@arm.com* Added ``py::dict`` keyword constructor:``auto d = dict("number"_a=42, "name"_a="World");`` 5411986Sandreas.sandberg@arm.com* Added ``py::str::format()`` method and ``_s`` literal: 5511986Sandreas.sandberg@arm.com ``py::str s = "1 + 2 = {}"_s.format(3);`` 5611986Sandreas.sandberg@arm.com* Attribute and item accessors now have a more complete interface which makes it possible 5711986Sandreas.sandberg@arm.com to chain attributes ``obj.attr("a")[key].attr("b").attr("method")(1, 2, 3)```. 5811986Sandreas.sandberg@arm.com* Added built-in support for ``std::shared_ptr`` holder type. There is no more need 5911986Sandreas.sandberg@arm.com to do it manually via ``PYBIND11_DECLARE_HOLDER_TYPE(T, std::shared_ptr<T>)``. 6011986Sandreas.sandberg@arm.com* Default return values policy changes: non-static properties now use ``reference_internal`` 6111986Sandreas.sandberg@arm.com and static properties use ``reference`` (previous default was ``automatic``, i.e. ``copy``). 6211986Sandreas.sandberg@arm.com* Support for ``std::experimental::optional<T>`` and ``std::optional<T>`` (C++17). 6311986Sandreas.sandberg@arm.com* Various minor improvements of library internals (no user-visible changes) 6411986Sandreas.sandberg@arm.com 6511986Sandreas.sandberg@arm.com1.8.1 (July 12, 2016) 6611986Sandreas.sandberg@arm.com---------------------- 6711986Sandreas.sandberg@arm.com* Fixed a rare but potentially very severe issue when the garbage collector ran 6811986Sandreas.sandberg@arm.com during pybind11 type creation. 6911986Sandreas.sandberg@arm.com 7011986Sandreas.sandberg@arm.com1.8.0 (June 14, 2016) 7111986Sandreas.sandberg@arm.com---------------------- 7211986Sandreas.sandberg@arm.com* Redesigned CMake build system which exports a convenient 7311986Sandreas.sandberg@arm.com ``pybind11_add_module`` function to parent projects. 7411986Sandreas.sandberg@arm.com* ``std::vector<>`` type bindings analogous to Boost.Python's ``indexing_suite`` 7511986Sandreas.sandberg@arm.com* Transparent conversion of sparse and dense Eigen matrices and vectors (``eigen.h``) 7611986Sandreas.sandberg@arm.com* Added an ``ExtraFlags`` template argument to the NumPy ``array_t<>`` wrapper 7711986Sandreas.sandberg@arm.com to disable an enforced cast that may lose precision, e.g. to create overloads 7811986Sandreas.sandberg@arm.com for different precisions and complex vs real-valued matrices. 7911986Sandreas.sandberg@arm.com* Prevent implicit conversion of floating point values to integral types in 8011986Sandreas.sandberg@arm.com function arguments 8111986Sandreas.sandberg@arm.com* Fixed incorrect default return value policy for functions returning a shared 8211986Sandreas.sandberg@arm.com pointer 8311986Sandreas.sandberg@arm.com* Don't allow registering a type via ``class_`` twice 8411986Sandreas.sandberg@arm.com* Don't allow casting a ``None`` value into a C++ lvalue reference 8511986Sandreas.sandberg@arm.com* Fixed a crash in ``enum_::operator==`` that was triggered by the ``help()`` command 8611986Sandreas.sandberg@arm.com* Improved detection of whether or not custom C++ types can be copy/move-constructed 8711986Sandreas.sandberg@arm.com* Extended ``str`` type to also work with ``bytes`` instances 8811986Sandreas.sandberg@arm.com* Added a ``"name"_a`` user defined string literal that is equivalent to ``py::arg("name")``. 8911986Sandreas.sandberg@arm.com* When specifying function arguments via ``py::arg``, the test that verifies 9011986Sandreas.sandberg@arm.com the number of arguments now runs at compile time. 9111986Sandreas.sandberg@arm.com* Added ``[[noreturn]]`` attribute to ``pybind11_fail()`` to quench some 9211986Sandreas.sandberg@arm.com compiler warnings 9311986Sandreas.sandberg@arm.com* List function arguments in exception text when the dispatch code cannot find 9411986Sandreas.sandberg@arm.com a matching overload 9511986Sandreas.sandberg@arm.com* Added ``PYBIND11_OVERLOAD_NAME`` and ``PYBIND11_OVERLOAD_PURE_NAME`` macros which 9611986Sandreas.sandberg@arm.com can be used to override virtual methods whose name differs in C++ and Python 9711986Sandreas.sandberg@arm.com (e.g. ``__call__`` and ``operator()``) 9811986Sandreas.sandberg@arm.com* Various minor ``iterator`` and ``make_iterator()`` improvements 9911986Sandreas.sandberg@arm.com* Transparently support ``__bool__`` on Python 2.x and Python 3.x 10011986Sandreas.sandberg@arm.com* Fixed issue with destructor of unpickled object not being called 10111986Sandreas.sandberg@arm.com* Minor CMake build system improvements on Windows 10211986Sandreas.sandberg@arm.com* New ``pybind11::args`` and ``pybind11::kwargs`` types to create functions which 10311986Sandreas.sandberg@arm.com take an arbitrary number of arguments and keyword arguments 10411986Sandreas.sandberg@arm.com* New syntax to call a Python function from C++ using ``*args`` and ``*kwargs`` 10511986Sandreas.sandberg@arm.com* The functions ``def_property_*`` now correctly process docstring arguments (these 10611986Sandreas.sandberg@arm.com formerly caused a segmentation fault) 10711986Sandreas.sandberg@arm.com* Many ``mkdoc.py`` improvements (enumerations, template arguments, ``DOC()`` 10811986Sandreas.sandberg@arm.com macro accepts more arguments) 10911986Sandreas.sandberg@arm.com* Cygwin support 11011986Sandreas.sandberg@arm.com* Documentation improvements (pickling support, ``keep_alive``, macro usage) 11111986Sandreas.sandberg@arm.com 11211986Sandreas.sandberg@arm.com1.7 (April 30, 2016) 11311986Sandreas.sandberg@arm.com---------------------- 11411986Sandreas.sandberg@arm.com* Added a new ``move`` return value policy that triggers C++11 move semantics. 11511986Sandreas.sandberg@arm.com The automatic return value policy falls back to this case whenever a rvalue 11611986Sandreas.sandberg@arm.com reference is encountered 11711986Sandreas.sandberg@arm.com* Significantly more general GIL state routines that are used instead of 11811986Sandreas.sandberg@arm.com Python's troublesome ``PyGILState_Ensure`` and ``PyGILState_Release`` API 11911986Sandreas.sandberg@arm.com* Redesign of opaque types that drastically simplifies their usage 12011986Sandreas.sandberg@arm.com* Extended ability to pass values of type ``[const] void *`` 12111986Sandreas.sandberg@arm.com* ``keep_alive`` fix: don't fail when there is no patient 12211986Sandreas.sandberg@arm.com* ``functional.h``: acquire the GIL before calling a Python function 12311986Sandreas.sandberg@arm.com* Added Python RAII type wrappers ``none`` and ``iterable`` 12411986Sandreas.sandberg@arm.com* Added ``*args`` and ``*kwargs`` pass-through parameters to 12511986Sandreas.sandberg@arm.com ``pybind11.get_include()`` function 12611986Sandreas.sandberg@arm.com* Iterator improvements and fixes 12711986Sandreas.sandberg@arm.com* Documentation on return value policies and opaque types improved 12811986Sandreas.sandberg@arm.com 12911986Sandreas.sandberg@arm.com1.6 (April 30, 2016) 13011986Sandreas.sandberg@arm.com---------------------- 13111986Sandreas.sandberg@arm.com* Skipped due to upload to PyPI gone wrong and inability to recover 13211986Sandreas.sandberg@arm.com (https://github.com/pypa/packaging-problems/issues/74) 13311986Sandreas.sandberg@arm.com 13411986Sandreas.sandberg@arm.com1.5 (April 21, 2016) 13511986Sandreas.sandberg@arm.com---------------------- 13611986Sandreas.sandberg@arm.com* For polymorphic types, use RTTI to try to return the closest type registered with pybind11 13711986Sandreas.sandberg@arm.com* Pickling support for serializing and unserializing C++ instances to a byte stream in Python 13811986Sandreas.sandberg@arm.com* Added a convenience routine ``make_iterator()`` which turns a range indicated 13911986Sandreas.sandberg@arm.com by a pair of C++ iterators into a iterable Python object 14011986Sandreas.sandberg@arm.com* Added ``len()`` and a variadic ``make_tuple()`` function 14111986Sandreas.sandberg@arm.com* Addressed a rare issue that could confuse the current virtual function 14211986Sandreas.sandberg@arm.com dispatcher and another that could lead to crashes in multi-threaded 14311986Sandreas.sandberg@arm.com applications 14411986Sandreas.sandberg@arm.com* Added a ``get_include()`` function to the Python module that returns the path 14511986Sandreas.sandberg@arm.com of the directory containing the installed pybind11 header files 14611986Sandreas.sandberg@arm.com* Documentation improvements: import issues, symbol visibility, pickling, limitations 14711986Sandreas.sandberg@arm.com* Added casting support for ``std::reference_wrapper<>`` 14811986Sandreas.sandberg@arm.com 14911986Sandreas.sandberg@arm.com1.4 (April 7, 2016) 15011986Sandreas.sandberg@arm.com-------------------------- 15111986Sandreas.sandberg@arm.com* Transparent type conversion for ``std::wstring`` and ``wchar_t`` 15211986Sandreas.sandberg@arm.com* Allow passing ``nullptr``-valued strings 15311986Sandreas.sandberg@arm.com* Transparent passing of ``void *`` pointers using capsules 15411986Sandreas.sandberg@arm.com* Transparent support for returning values wrapped in ``std::unique_ptr<>`` 15511986Sandreas.sandberg@arm.com* Improved docstring generation for compatibility with Sphinx 15611986Sandreas.sandberg@arm.com* Nicer debug error message when default parameter construction fails 15711986Sandreas.sandberg@arm.com* Support for "opaque" types that bypass the transparent conversion layer for STL containers 15811986Sandreas.sandberg@arm.com* Redesigned type casting interface to avoid ambiguities that could occasionally cause compiler errors 15911986Sandreas.sandberg@arm.com* Redesigned property implementation; fixes crashes due to an unfortunate default return value policy 16011986Sandreas.sandberg@arm.com* Anaconda package generation support 16111986Sandreas.sandberg@arm.com 16211986Sandreas.sandberg@arm.com1.3 (March 8, 2016) 16311986Sandreas.sandberg@arm.com-------------------------- 16411986Sandreas.sandberg@arm.com 16511986Sandreas.sandberg@arm.com* Added support for the Intel C++ compiler (v15+) 16611986Sandreas.sandberg@arm.com* Added support for the STL unordered set/map data structures 16711986Sandreas.sandberg@arm.com* Added support for the STL linked list data structure 16811986Sandreas.sandberg@arm.com* NumPy-style broadcasting support in ``pybind11::vectorize`` 16911986Sandreas.sandberg@arm.com* pybind11 now displays more verbose error messages when ``arg::operator=()`` fails 17011986Sandreas.sandberg@arm.com* pybind11 internal data structures now live in a version-dependent namespace to avoid ABI issues 17111986Sandreas.sandberg@arm.com* Many, many bugfixes involving corner cases and advanced usage 17211986Sandreas.sandberg@arm.com 17311986Sandreas.sandberg@arm.com1.2 (February 7, 2016) 17411986Sandreas.sandberg@arm.com-------------------------- 17511986Sandreas.sandberg@arm.com 17611986Sandreas.sandberg@arm.com* Optional: efficient generation of function signatures at compile time using C++14 17711986Sandreas.sandberg@arm.com* Switched to a simpler and more general way of dealing with function default 17811986Sandreas.sandberg@arm.com arguments. Unused keyword arguments in function calls are now detected and 17911986Sandreas.sandberg@arm.com cause errors as expected 18011986Sandreas.sandberg@arm.com* New ``keep_alive`` call policy analogous to Boost.Python's ``with_custodian_and_ward`` 18111986Sandreas.sandberg@arm.com* New ``pybind11::base<>`` attribute to indicate a subclass relationship 18211986Sandreas.sandberg@arm.com* Improved interface for RAII type wrappers in ``pytypes.h`` 18311986Sandreas.sandberg@arm.com* Use RAII type wrappers consistently within pybind11 itself. This 18411986Sandreas.sandberg@arm.com fixes various potential refcount leaks when exceptions occur 18511986Sandreas.sandberg@arm.com* Added new ``bytes`` RAII type wrapper (maps to ``string`` in Python 2.7) 18611986Sandreas.sandberg@arm.com* Made handle and related RAII classes const correct, using them more 18711986Sandreas.sandberg@arm.com consistently everywhere now 18811986Sandreas.sandberg@arm.com* Got rid of the ugly ``__pybind11__`` attributes on the Python side---they are 18911986Sandreas.sandberg@arm.com now stored in a C++ hash table that is not visible in Python 19011986Sandreas.sandberg@arm.com* Fixed refcount leaks involving NumPy arrays and bound functions 19111986Sandreas.sandberg@arm.com* Vastly improved handling of shared/smart pointers 19211986Sandreas.sandberg@arm.com* Removed an unnecessary copy operation in ``pybind11::vectorize`` 19311986Sandreas.sandberg@arm.com* Fixed naming clashes when both pybind11 and NumPy headers are included 19411986Sandreas.sandberg@arm.com* Added conversions for additional exception types 19511986Sandreas.sandberg@arm.com* Documentation improvements (using multiple extension modules, smart pointers, 19611986Sandreas.sandberg@arm.com other minor clarifications) 19711986Sandreas.sandberg@arm.com* unified infrastructure for parsing variadic arguments in ``class_`` and cpp_function 19811986Sandreas.sandberg@arm.com* Fixed license text (was: ZLIB, should have been: 3-clause BSD) 19911986Sandreas.sandberg@arm.com* Python 3.2 compatibility 20011986Sandreas.sandberg@arm.com* Fixed remaining issues when accessing types in another plugin module 20111986Sandreas.sandberg@arm.com* Added enum comparison and casting methods 20211986Sandreas.sandberg@arm.com* Improved SFINAE-based detection of whether types are copy-constructible 20311986Sandreas.sandberg@arm.com* Eliminated many warnings about unused variables and the use of ``offsetof()`` 20411986Sandreas.sandberg@arm.com* Support for ``std::array<>`` conversions 20511986Sandreas.sandberg@arm.com 20611986Sandreas.sandberg@arm.com1.1 (December 7, 2015) 20711986Sandreas.sandberg@arm.com-------------------------- 20811986Sandreas.sandberg@arm.com 20911986Sandreas.sandberg@arm.com* Documentation improvements (GIL, wrapping functions, casting, fixed many typos) 21011986Sandreas.sandberg@arm.com* Generalized conversion of integer types 21111986Sandreas.sandberg@arm.com* Improved support for casting function objects 21211986Sandreas.sandberg@arm.com* Improved support for ``std::shared_ptr<>`` conversions 21311986Sandreas.sandberg@arm.com* Initial support for ``std::set<>`` conversions 21411986Sandreas.sandberg@arm.com* Fixed type resolution issue for types defined in a separate plugin module 21511986Sandreas.sandberg@arm.com* Cmake build system improvements 21611986Sandreas.sandberg@arm.com* Factored out generic functionality to non-templated code (smaller code size) 21711986Sandreas.sandberg@arm.com* Added a code size / compile time benchmark vs Boost.Python 21811986Sandreas.sandberg@arm.com* Added an appveyor CI script 21911986Sandreas.sandberg@arm.com 22011986Sandreas.sandberg@arm.com1.0 (October 15, 2015) 22111986Sandreas.sandberg@arm.com------------------------ 22211986Sandreas.sandberg@arm.com* Initial release 223