blob: 0485e925a11ef9557bb83edc0fcb384b14fd12f2 [file] [log] [blame]
Wenzel Jakob1ae77fe2016-01-17 22:36:43 +01001.. _changelog:
2
3Changelog
4#########
5
Wenzel Jakobf9502152016-06-14 15:00:46 +02006Starting with version 1.8, pybind11 releases use a
7[semantic versioning](http://semver.org) policy.
8
9Breaking changes queued for v2.0.0 (Not yet released)
Wenzel Jakobf88af0c2016-06-22 13:52:31 +020010-----------------------------------------------------
Wenzel Jakob1cbe7ef2016-06-14 14:55:10 +020011* Redesigned virtual call mechanism and user-facing syntax (see
12 https://github.com/pybind/pybind11/commit/86d825f3302701d81414ddd3d38bcd09433076bc)
13
14* Remove ``handle.call()`` method
15
Wenzel Jakobf9502152016-06-14 15:00:46 +0200161.9.0 (Not yet released)
Wenzel Jakobf88af0c2016-06-22 13:52:31 +020017------------------------
Wenzel Jakobe6b2f752016-07-10 10:54:46 +020018* Queued changes: map indexing suite, documentation for indexing suites.
19* Mapping a stateless C++ function to Python and back is now "for free" (i.e. no call overheads)
Wenzel Jakob58ec1ca2016-07-11 23:39:39 +020020* Support for translation of arbitrary C++ exceptions to Python counterparts
Wenzel Jakobe6b2f752016-07-10 10:54:46 +020021* Added ``eval`` and ``eval_file`` functions for evaluating expressions and
22 statements from a string or file
23* eigen.h type converter fixed for non-contiguous arrays (e.g. slices)
Wenzel Jakobc47d4982016-07-11 23:40:28 +020024* Print more informative error messages when ``make_tuple()`` or ``cast()`` fail
Wenzel Jakobe6b2f752016-07-10 10:54:46 +020025* ``std::enable_shared_from_this<>`` now also works for ``const`` values
Wenzel Jakobc47d4982016-07-11 23:40:28 +020026* A return value policy can now be passed to ``handle::operator()``
27* ``make_iterator()`` improvements for better compatibility with various types
Ivan Smirnov606160e2016-08-24 23:32:13 +010028 (now uses prefix increment operator); it now also accepts iterators with
29 different begin/end types as long as they are equality comparable.
Wenzel Jakobe6b2f752016-07-10 10:54:46 +020030* ``arg()`` now accepts a wider range of argument types for default values
Ivan Smirnov67157362016-08-14 00:05:05 +010031* Added ``repr()`` method to the ``handle`` class.
Ivan Smirnovbccbc102016-08-13 21:17:26 +010032* Added support for registering structured dtypes via ``PYBIND11_NUMPY_DTYPE()`` macro.
33* Added ``PYBIND11_STR_TYPE`` macro which maps to the ``builtins.str`` type.
34* Added a simplified ``buffer_info`` constructor for 1-dimensional buffers.
35* Format descriptor strings should now be accessed via ``format_descriptor::format()``
36 (for compatibility purposes, the old syntax ``format_descriptor::value`` will still
37 work for non-structured data types).
38* Added a class wrapping NumPy array descriptors: ``dtype``.
39* Added buffer/NumPy support for ``char[N]`` and ``std::array<char, N>`` types.
40* ``array`` gained new constructors accepting dtype objects.
41* Added constructors for ``array`` and ``array_t`` explicitly accepting shape and
42 strides; if strides are not provided, they are deduced assuming C-contiguity.
43 Also added simplified constructors for 1-dimensional case.
44* Added constructors for ``str`` from ``bytes`` and for ``bytes`` from ``str``.
45 This will do the UTF-8 decoding/encoding as required.
46* Added constructors for ``str`` and ``bytes`` from zero-terminated char pointers,
47 and from char pointers and length.
48* Added ``memoryview`` wrapper type which is constructible from ``buffer_info``.
Wenzel Jakoba720a602016-07-12 18:02:13 +020049* Various minor improvements of library internals (no user-visible changes)
50
511.8.1 (July 12, 2016)
52----------------------
Wenzel Jakobc47d4982016-07-11 23:40:28 +020053* Fixed a rare but potentially very severe issue when the garbage collector ran
54 during pybind11 type creation.
Wenzel Jakob1cbe7ef2016-06-14 14:55:10 +020055
Wenzel Jakobf9502152016-06-14 15:00:46 +0200561.8.0 (June 14, 2016)
Wenzel Jakob1cbe7ef2016-06-14 14:55:10 +020057----------------------
58* Redesigned CMake build system which exports a convenient
59 ``pybind11_add_module`` function to parent projects.
60* ``std::vector<>`` type bindings analogous to Boost.Python's ``indexing_suite``
61* Transparent conversion of sparse and dense Eigen matrices and vectors (``eigen.h``)
62* Added an ``ExtraFlags`` template argument to the NumPy ``array_t<>`` wrapper
63 to disable an enforced cast that may lose precision, e.g. to create overloads
64 for different precisions and complex vs real-valued matrices.
Wenzel Jakob3f200fa2016-05-17 15:35:29 +020065* Prevent implicit conversion of floating point values to integral types in
66 function arguments
Wenzel Jakob163ac2e2016-05-03 14:16:18 +020067* Fixed incorrect default return value policy for functions returning a shared
68 pointer
Wenzel Jakob38d8b8c2016-05-31 09:53:28 +020069* Don't allow registering a type via ``class_`` twice
Wenzel Jakob163ac2e2016-05-03 14:16:18 +020070* Don't allow casting a ``None`` value into a C++ lvalue reference
71* Fixed a crash in ``enum_::operator==`` that was triggered by the ``help()`` command
72* Improved detection of whether or not custom C++ types can be copy/move-constructed
73* Extended ``str`` type to also work with ``bytes`` instances
Wenzel Jakob1cbe7ef2016-06-14 14:55:10 +020074* Added a ``"name"_a`` user defined string literal that is equivalent to ``py::arg("name")``.
75* When specifying function arguments via ``py::arg``, the test that verifies
76 the number of arguments now runs at compile time.
Wenzel Jakob163ac2e2016-05-03 14:16:18 +020077* Added ``[[noreturn]]`` attribute to ``pybind11_fail()`` to quench some
78 compiler warnings
Wenzel Jakob86d825f2016-05-26 13:19:27 +020079* List function arguments in exception text when the dispatch code cannot find
80 a matching overload
Wenzel Jakob1cbe7ef2016-06-14 14:55:10 +020081* Added ``PYBIND11_OVERLOAD_NAME`` and ``PYBIND11_OVERLOAD_PURE_NAME`` macros which
Wenzel Jakobf9502152016-06-14 15:00:46 +020082 can be used to override virtual methods whose name differs in C++ and Python
Wenzel Jakob1cbe7ef2016-06-14 14:55:10 +020083 (e.g. ``__call__`` and ``operator()``)
Wenzel Jakob163ac2e2016-05-03 14:16:18 +020084* Various minor ``iterator`` and ``make_iterator()`` improvements
Wenzel Jakob86d825f2016-05-26 13:19:27 +020085* Transparently support ``__bool__`` on Python 2.x and Python 3.x
86* Fixed issue with destructor of unpickled object not being called
Wenzel Jakob163ac2e2016-05-03 14:16:18 +020087* Minor CMake build system improvements on Windows
Wenzel Jakob86d825f2016-05-26 13:19:27 +020088* New ``pybind11::args`` and ``pybind11::kwargs`` types to create functions which
89 take an arbitrary number of arguments and keyword arguments
90* New syntax to call a Python function from C++ using ``*args`` and ``*kwargs``
Wenzel Jakob1cbe7ef2016-06-14 14:55:10 +020091* The functions ``def_property_*`` now correctly process docstring arguments (these
92 formerly caused a segmentation fault)
93* Many ``mkdoc.py`` improvements (enumerations, template arguments, ``DOC()``
94 macro accepts more arguments)
95* Cygwin support
96* Documentation improvements (pickling support, ``keep_alive``, macro usage)
Wenzel Jakobc4d7ccd2016-04-30 22:00:44 +020097
Wenzel Jakobe70b2ab2016-04-30 19:58:33 +0200981.7 (April 30, 2016)
Wenzel Jakobbb79d7b2016-04-21 12:23:20 +020099----------------------
Wenzel Jakob1ac22e32016-04-25 23:25:40 +0200100* Added a new ``move`` return value policy that triggers C++11 move semantics.
Wenzel Jakobdd7ec342016-04-29 10:06:24 +0200101 The automatic return value policy falls back to this case whenever a rvalue
Wenzel Jakob1ac22e32016-04-25 23:25:40 +0200102 reference is encountered
Wenzel Jakobe84f5572016-04-26 23:19:19 +0200103* Significantly more general GIL state routines that are used instead of
104 Python's troublesome ``PyGILState_Ensure`` and ``PyGILState_Release`` API
Wenzel Jakobdd7ec342016-04-29 10:06:24 +0200105* Redesign of opaque types that drastically simplifies their usage
Wenzel Jakobe70b2ab2016-04-30 19:58:33 +0200106* Extended ability to pass values of type ``[const] void *``
Wenzel Jakob1ac22e32016-04-25 23:25:40 +0200107* ``keep_alive`` fix: don't fail when there is no patient
Wenzel Jakobdd7ec342016-04-29 10:06:24 +0200108* ``functional.h``: acquire the GIL before calling a Python function
Wenzel Jakob1ac22e32016-04-25 23:25:40 +0200109* Added Python RAII type wrappers ``none`` and ``iterable``
110* Added ``*args`` and ``*kwargs`` pass-through parameters to
111 ``pybind11.get_include()`` function
Wenzel Jakobdd7ec342016-04-29 10:06:24 +0200112* Iterator improvements and fixes
113* Documentation on return value policies and opaque types improved
Wenzel Jakobbb79d7b2016-04-21 12:23:20 +0200114
Wenzel Jakobe70b2ab2016-04-30 19:58:33 +02001151.6 (April 30, 2016)
116----------------------
117* Skipped due to upload to PyPI gone wrong and inability to recover
118 (https://github.com/pypa/packaging-problems/issues/74)
119
Wenzel Jakobbb79d7b2016-04-21 12:23:20 +02001201.5 (April 21, 2016)
Wenzel Jakob2c5d5602016-04-11 18:46:11 +0200121----------------------
Wenzel Jakobc79dbe42016-04-17 21:54:31 +0200122* For polymorphic types, use RTTI to try to return the closest type registered with pybind11
Wenzel Jakobd7efa4f2016-04-13 13:45:09 +0200123* Pickling support for serializing and unserializing C++ instances to a byte stream in Python
Wenzel Jakobb2825952016-04-13 23:33:00 +0200124* Added a convenience routine ``make_iterator()`` which turns a range indicated
125 by a pair of C++ iterators into a iterable Python object
126* Added ``len()`` and a variadic ``make_tuple()`` function
Wenzel Jakobb2b44a92016-04-15 17:50:40 +0200127* Addressed a rare issue that could confuse the current virtual function
128 dispatcher and another that could lead to crashes in multi-threaded
129 applications
Wenzel Jakobb2825952016-04-13 23:33:00 +0200130* Added a ``get_include()`` function to the Python module that returns the path
131 of the directory containing the installed pybind11 header files
Wenzel Jakob1c329aa2016-04-13 02:37:36 +0200132* Documentation improvements: import issues, symbol visibility, pickling, limitations
Wenzel Jakobdbe43ff2016-04-21 12:21:14 +0200133* Added casting support for ``std::reference_wrapper<>``
Wenzel Jakob2c5d5602016-04-11 18:46:11 +0200134
Wenzel Jakob33c2a042016-04-07 09:06:49 +02001351.4 (April 7, 2016)
Wenzel Jakobd2385e82016-03-08 18:04:43 +0100136--------------------------
Wenzel Jakob81dfd2c2016-03-08 19:40:32 +0100137* Transparent type conversion for ``std::wstring`` and ``wchar_t``
Wenzel Jakob0e6ca592016-04-07 08:49:37 +0200138* Allow passing ``nullptr``-valued strings
Wenzel Jakob34116732016-04-06 17:55:41 +0200139* Transparent passing of ``void *`` pointers using capsules
Wenzel Jakob0e6ca592016-04-07 08:49:37 +0200140* Transparent support for returning values wrapped in ``std::unique_ptr<>``
Wenzel Jakob4e455dd2016-03-09 16:38:28 +0100141* Improved docstring generation for compatibility with Sphinx
Wenzel Jakob34116732016-04-06 17:55:41 +0200142* Nicer debug error message when default parameter construction fails
143* Support for "opaque" types that bypass the transparent conversion layer for STL containers
144* Redesigned type casting interface to avoid ambiguities that could occasionally cause compiler errors
Wenzel Jakob2c5d5602016-04-11 18:46:11 +0200145* Redesigned property implementation; fixes crashes due to an unfortunate default return value policy
Wenzel Jakob4e455dd2016-03-09 16:38:28 +0100146* Anaconda package generation support
Wenzel Jakobd2385e82016-03-08 18:04:43 +0100147
1481.3 (March 8, 2016)
Wenzel Jakob8ed28082016-02-07 17:32:37 +0100149--------------------------
Wenzel Jakobcf2b87a2016-02-22 17:32:44 +0100150
151* Added support for the Intel C++ compiler (v15+)
152* Added support for the STL unordered set/map data structures
Wenzel Jakobd2385e82016-03-08 18:04:43 +0100153* Added support for the STL linked list data structure
Wenzel Jakobcf2b87a2016-02-22 17:32:44 +0100154* NumPy-style broadcasting support in ``pybind11::vectorize``
Wenzel Jakob2c5d5602016-04-11 18:46:11 +0200155* pybind11 now displays more verbose error messages when ``arg::operator=()`` fails
Wenzel Jakobd2385e82016-03-08 18:04:43 +0100156* pybind11 internal data structures now live in a version-dependent namespace to avoid ABI issues
157* Many, many bugfixes involving corner cases and advanced usage
Wenzel Jakob8ed28082016-02-07 17:32:37 +0100158
1591.2 (February 7, 2016)
Wenzel Jakob1ae77fe2016-01-17 22:36:43 +0100160--------------------------
Wenzel Jakob48548ea2016-01-17 22:36:44 +0100161
Wenzel Jakob1ae77fe2016-01-17 22:36:43 +0100162* Optional: efficient generation of function signatures at compile time using C++14
Wenzel Jakob48548ea2016-01-17 22:36:44 +0100163* Switched to a simpler and more general way of dealing with function default
164 arguments. Unused keyword arguments in function calls are now detected and
165 cause errors as expected
Wenzel Jakob1ae77fe2016-01-17 22:36:43 +0100166* New ``keep_alive`` call policy analogous to Boost.Python's ``with_custodian_and_ward``
Wenzel Jakob48548ea2016-01-17 22:36:44 +0100167* New ``pybind11::base<>`` attribute to indicate a subclass relationship
Wenzel Jakob1ae77fe2016-01-17 22:36:43 +0100168* Improved interface for RAII type wrappers in ``pytypes.h``
169* Use RAII type wrappers consistently within pybind11 itself. This
170 fixes various potential refcount leaks when exceptions occur
Wenzel Jakob2c5d5602016-04-11 18:46:11 +0200171* Added new ``bytes`` RAII type wrapper (maps to ``string`` in Python 2.7)
Wenzel Jakob48548ea2016-01-17 22:36:44 +0100172* Made handle and related RAII classes const correct, using them more
173 consistently everywhere now
Wenzel Jakob1ae77fe2016-01-17 22:36:43 +0100174* Got rid of the ugly ``__pybind11__`` attributes on the Python side---they are
175 now stored in a C++ hash table that is not visible in Python
176* Fixed refcount leaks involving NumPy arrays and bound functions
177* Vastly improved handling of shared/smart pointers
178* Removed an unnecessary copy operation in ``pybind11::vectorize``
179* Fixed naming clashes when both pybind11 and NumPy headers are included
180* Added conversions for additional exception types
Wenzel Jakob48548ea2016-01-17 22:36:44 +0100181* Documentation improvements (using multiple extension modules, smart pointers,
182 other minor clarifications)
Wenzel Jakob61587162016-01-18 22:38:52 +0100183* unified infrastructure for parsing variadic arguments in ``class_`` and cpp_function
Wenzel Jakob1ae77fe2016-01-17 22:36:43 +0100184* Fixed license text (was: ZLIB, should have been: 3-clause BSD)
185* Python 3.2 compatibility
Wenzel Jakobcd4e6ae2016-01-29 11:48:40 +0100186* Fixed remaining issues when accessing types in another plugin module
187* Added enum comparison and casting methods
188* Improved SFINAE-based detection of whether types are copy-constructible
189* Eliminated many warnings about unused variables and the use of ``offsetof()``
Wenzel Jakob8ed28082016-02-07 17:32:37 +0100190* Support for ``std::array<>`` conversions
Wenzel Jakob1ae77fe2016-01-17 22:36:43 +0100191
1921.1 (December 7, 2015)
193--------------------------
194
195* Documentation improvements (GIL, wrapping functions, casting, fixed many typos)
196* Generalized conversion of integer types
197* Improved support for casting function objects
198* Improved support for ``std::shared_ptr<>`` conversions
199* Initial support for ``std::set<>`` conversions
200* Fixed type resolution issue for types defined in a separate plugin module
201* Cmake build system improvements
202* Factored out generic functionality to non-templated code (smaller code size)
203* Added a code size / compile time benchmark vs Boost.Python
204* Added an appveyor CI script
205
2061.0 (October 15, 2015)
207------------------------
208* Initial release