Wenzel Jakob | 1ae77fe | 2016-01-17 22:36:43 +0100 | [diff] [blame] | 1 | .. _changelog: |
| 2 | |
| 3 | Changelog |
| 4 | ######### |
| 5 | |
Wenzel Jakob | f950215 | 2016-06-14 15:00:46 +0200 | [diff] [blame] | 6 | Starting with version 1.8, pybind11 releases use a |
| 7 | [semantic versioning](http://semver.org) policy. |
| 8 | |
| 9 | Breaking changes queued for v2.0.0 (Not yet released) |
Wenzel Jakob | f88af0c | 2016-06-22 13:52:31 +0200 | [diff] [blame] | 10 | ----------------------------------------------------- |
Wenzel Jakob | 1cbe7ef | 2016-06-14 14:55:10 +0200 | [diff] [blame] | 11 | * 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 Jakob | f950215 | 2016-06-14 15:00:46 +0200 | [diff] [blame] | 16 | 1.9.0 (Not yet released) |
Wenzel Jakob | f88af0c | 2016-06-22 13:52:31 +0200 | [diff] [blame] | 17 | ------------------------ |
Wenzel Jakob | e6b2f75 | 2016-07-10 10:54:46 +0200 | [diff] [blame] | 18 | * 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 Jakob | 58ec1ca | 2016-07-11 23:39:39 +0200 | [diff] [blame] | 20 | * Support for translation of arbitrary C++ exceptions to Python counterparts |
Wenzel Jakob | e6b2f75 | 2016-07-10 10:54:46 +0200 | [diff] [blame] | 21 | * 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 Jakob | c47d498 | 2016-07-11 23:40:28 +0200 | [diff] [blame] | 24 | * Print more informative error messages when ``make_tuple()`` or ``cast()`` fail |
Wenzel Jakob | e6b2f75 | 2016-07-10 10:54:46 +0200 | [diff] [blame] | 25 | * ``std::enable_shared_from_this<>`` now also works for ``const`` values |
Wenzel Jakob | c47d498 | 2016-07-11 23:40:28 +0200 | [diff] [blame] | 26 | * A return value policy can now be passed to ``handle::operator()`` |
| 27 | * ``make_iterator()`` improvements for better compatibility with various types |
Ivan Smirnov | 606160e | 2016-08-24 23:32:13 +0100 | [diff] [blame] | 28 | (now uses prefix increment operator); it now also accepts iterators with |
| 29 | different begin/end types as long as they are equality comparable. |
Wenzel Jakob | e6b2f75 | 2016-07-10 10:54:46 +0200 | [diff] [blame] | 30 | * ``arg()`` now accepts a wider range of argument types for default values |
Ivan Smirnov | 6715736 | 2016-08-14 00:05:05 +0100 | [diff] [blame] | 31 | * Added ``repr()`` method to the ``handle`` class. |
Ivan Smirnov | bccbc10 | 2016-08-13 21:17:26 +0100 | [diff] [blame] | 32 | * 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``. |
Dean Moldovan | 625bd48 | 2016-09-02 16:40:49 +0200 | [diff] [blame] | 49 | * New syntax to call a Python function from C++ using keyword arguments and unpacking, |
| 50 | e.g. ``foo(1, 2, "z"_a=3)`` or ``bar(1, *args, "z"_a=3, **kwargs)``. |
| 51 | * Added ``py::print()`` function which replicates Python's API and writes to Python's |
| 52 | ``sys.stdout`` by default (as opposed to C's ``stdout`` like ``std::cout``). |
| 53 | * Added ``py::dict`` keyword constructor:``auto d = dict("number"_a=42, "name"_a="World");`` |
| 54 | * Added ``py::str::format()`` method and ``_s`` literal: |
| 55 | ``py::str s = "1 + 2 = {}"_s.format(3);`` |
Dean Moldovan | 242b146 | 2016-09-08 17:02:04 +0200 | [diff] [blame] | 56 | * Attribute and item accessors now have a more complete interface which makes it possible |
| 57 | to chain attributes ``obj.attr("a")[key].attr("b").attr("method")(1, 2, 3)```. |
Wenzel Jakob | a720a60 | 2016-07-12 18:02:13 +0200 | [diff] [blame] | 58 | * Various minor improvements of library internals (no user-visible changes) |
| 59 | |
| 60 | 1.8.1 (July 12, 2016) |
| 61 | ---------------------- |
Wenzel Jakob | c47d498 | 2016-07-11 23:40:28 +0200 | [diff] [blame] | 62 | * Fixed a rare but potentially very severe issue when the garbage collector ran |
| 63 | during pybind11 type creation. |
Wenzel Jakob | 1cbe7ef | 2016-06-14 14:55:10 +0200 | [diff] [blame] | 64 | |
Wenzel Jakob | f950215 | 2016-06-14 15:00:46 +0200 | [diff] [blame] | 65 | 1.8.0 (June 14, 2016) |
Wenzel Jakob | 1cbe7ef | 2016-06-14 14:55:10 +0200 | [diff] [blame] | 66 | ---------------------- |
| 67 | * Redesigned CMake build system which exports a convenient |
| 68 | ``pybind11_add_module`` function to parent projects. |
| 69 | * ``std::vector<>`` type bindings analogous to Boost.Python's ``indexing_suite`` |
| 70 | * Transparent conversion of sparse and dense Eigen matrices and vectors (``eigen.h``) |
| 71 | * Added an ``ExtraFlags`` template argument to the NumPy ``array_t<>`` wrapper |
| 72 | to disable an enforced cast that may lose precision, e.g. to create overloads |
| 73 | for different precisions and complex vs real-valued matrices. |
Wenzel Jakob | 3f200fa | 2016-05-17 15:35:29 +0200 | [diff] [blame] | 74 | * Prevent implicit conversion of floating point values to integral types in |
| 75 | function arguments |
Wenzel Jakob | 163ac2e | 2016-05-03 14:16:18 +0200 | [diff] [blame] | 76 | * Fixed incorrect default return value policy for functions returning a shared |
| 77 | pointer |
Wenzel Jakob | 38d8b8c | 2016-05-31 09:53:28 +0200 | [diff] [blame] | 78 | * Don't allow registering a type via ``class_`` twice |
Wenzel Jakob | 163ac2e | 2016-05-03 14:16:18 +0200 | [diff] [blame] | 79 | * Don't allow casting a ``None`` value into a C++ lvalue reference |
| 80 | * Fixed a crash in ``enum_::operator==`` that was triggered by the ``help()`` command |
| 81 | * Improved detection of whether or not custom C++ types can be copy/move-constructed |
| 82 | * Extended ``str`` type to also work with ``bytes`` instances |
Wenzel Jakob | 1cbe7ef | 2016-06-14 14:55:10 +0200 | [diff] [blame] | 83 | * Added a ``"name"_a`` user defined string literal that is equivalent to ``py::arg("name")``. |
| 84 | * When specifying function arguments via ``py::arg``, the test that verifies |
| 85 | the number of arguments now runs at compile time. |
Wenzel Jakob | 163ac2e | 2016-05-03 14:16:18 +0200 | [diff] [blame] | 86 | * Added ``[[noreturn]]`` attribute to ``pybind11_fail()`` to quench some |
| 87 | compiler warnings |
Wenzel Jakob | 86d825f | 2016-05-26 13:19:27 +0200 | [diff] [blame] | 88 | * List function arguments in exception text when the dispatch code cannot find |
| 89 | a matching overload |
Wenzel Jakob | 1cbe7ef | 2016-06-14 14:55:10 +0200 | [diff] [blame] | 90 | * Added ``PYBIND11_OVERLOAD_NAME`` and ``PYBIND11_OVERLOAD_PURE_NAME`` macros which |
Wenzel Jakob | f950215 | 2016-06-14 15:00:46 +0200 | [diff] [blame] | 91 | can be used to override virtual methods whose name differs in C++ and Python |
Wenzel Jakob | 1cbe7ef | 2016-06-14 14:55:10 +0200 | [diff] [blame] | 92 | (e.g. ``__call__`` and ``operator()``) |
Wenzel Jakob | 163ac2e | 2016-05-03 14:16:18 +0200 | [diff] [blame] | 93 | * Various minor ``iterator`` and ``make_iterator()`` improvements |
Wenzel Jakob | 86d825f | 2016-05-26 13:19:27 +0200 | [diff] [blame] | 94 | * Transparently support ``__bool__`` on Python 2.x and Python 3.x |
| 95 | * Fixed issue with destructor of unpickled object not being called |
Wenzel Jakob | 163ac2e | 2016-05-03 14:16:18 +0200 | [diff] [blame] | 96 | * Minor CMake build system improvements on Windows |
Wenzel Jakob | 86d825f | 2016-05-26 13:19:27 +0200 | [diff] [blame] | 97 | * New ``pybind11::args`` and ``pybind11::kwargs`` types to create functions which |
| 98 | take an arbitrary number of arguments and keyword arguments |
| 99 | * New syntax to call a Python function from C++ using ``*args`` and ``*kwargs`` |
Wenzel Jakob | 1cbe7ef | 2016-06-14 14:55:10 +0200 | [diff] [blame] | 100 | * The functions ``def_property_*`` now correctly process docstring arguments (these |
| 101 | formerly caused a segmentation fault) |
| 102 | * Many ``mkdoc.py`` improvements (enumerations, template arguments, ``DOC()`` |
| 103 | macro accepts more arguments) |
| 104 | * Cygwin support |
| 105 | * Documentation improvements (pickling support, ``keep_alive``, macro usage) |
Wenzel Jakob | c4d7ccd | 2016-04-30 22:00:44 +0200 | [diff] [blame] | 106 | |
Wenzel Jakob | e70b2ab | 2016-04-30 19:58:33 +0200 | [diff] [blame] | 107 | 1.7 (April 30, 2016) |
Wenzel Jakob | bb79d7b | 2016-04-21 12:23:20 +0200 | [diff] [blame] | 108 | ---------------------- |
Wenzel Jakob | 1ac22e3 | 2016-04-25 23:25:40 +0200 | [diff] [blame] | 109 | * Added a new ``move`` return value policy that triggers C++11 move semantics. |
Wenzel Jakob | dd7ec34 | 2016-04-29 10:06:24 +0200 | [diff] [blame] | 110 | The automatic return value policy falls back to this case whenever a rvalue |
Wenzel Jakob | 1ac22e3 | 2016-04-25 23:25:40 +0200 | [diff] [blame] | 111 | reference is encountered |
Wenzel Jakob | e84f557 | 2016-04-26 23:19:19 +0200 | [diff] [blame] | 112 | * Significantly more general GIL state routines that are used instead of |
| 113 | Python's troublesome ``PyGILState_Ensure`` and ``PyGILState_Release`` API |
Wenzel Jakob | dd7ec34 | 2016-04-29 10:06:24 +0200 | [diff] [blame] | 114 | * Redesign of opaque types that drastically simplifies their usage |
Wenzel Jakob | e70b2ab | 2016-04-30 19:58:33 +0200 | [diff] [blame] | 115 | * Extended ability to pass values of type ``[const] void *`` |
Wenzel Jakob | 1ac22e3 | 2016-04-25 23:25:40 +0200 | [diff] [blame] | 116 | * ``keep_alive`` fix: don't fail when there is no patient |
Wenzel Jakob | dd7ec34 | 2016-04-29 10:06:24 +0200 | [diff] [blame] | 117 | * ``functional.h``: acquire the GIL before calling a Python function |
Wenzel Jakob | 1ac22e3 | 2016-04-25 23:25:40 +0200 | [diff] [blame] | 118 | * Added Python RAII type wrappers ``none`` and ``iterable`` |
| 119 | * Added ``*args`` and ``*kwargs`` pass-through parameters to |
| 120 | ``pybind11.get_include()`` function |
Wenzel Jakob | dd7ec34 | 2016-04-29 10:06:24 +0200 | [diff] [blame] | 121 | * Iterator improvements and fixes |
| 122 | * Documentation on return value policies and opaque types improved |
Wenzel Jakob | bb79d7b | 2016-04-21 12:23:20 +0200 | [diff] [blame] | 123 | |
Wenzel Jakob | e70b2ab | 2016-04-30 19:58:33 +0200 | [diff] [blame] | 124 | 1.6 (April 30, 2016) |
| 125 | ---------------------- |
| 126 | * Skipped due to upload to PyPI gone wrong and inability to recover |
| 127 | (https://github.com/pypa/packaging-problems/issues/74) |
| 128 | |
Wenzel Jakob | bb79d7b | 2016-04-21 12:23:20 +0200 | [diff] [blame] | 129 | 1.5 (April 21, 2016) |
Wenzel Jakob | 2c5d560 | 2016-04-11 18:46:11 +0200 | [diff] [blame] | 130 | ---------------------- |
Wenzel Jakob | c79dbe4 | 2016-04-17 21:54:31 +0200 | [diff] [blame] | 131 | * For polymorphic types, use RTTI to try to return the closest type registered with pybind11 |
Wenzel Jakob | d7efa4f | 2016-04-13 13:45:09 +0200 | [diff] [blame] | 132 | * Pickling support for serializing and unserializing C++ instances to a byte stream in Python |
Wenzel Jakob | b282595 | 2016-04-13 23:33:00 +0200 | [diff] [blame] | 133 | * Added a convenience routine ``make_iterator()`` which turns a range indicated |
| 134 | by a pair of C++ iterators into a iterable Python object |
| 135 | * Added ``len()`` and a variadic ``make_tuple()`` function |
Wenzel Jakob | b2b44a9 | 2016-04-15 17:50:40 +0200 | [diff] [blame] | 136 | * Addressed a rare issue that could confuse the current virtual function |
| 137 | dispatcher and another that could lead to crashes in multi-threaded |
| 138 | applications |
Wenzel Jakob | b282595 | 2016-04-13 23:33:00 +0200 | [diff] [blame] | 139 | * Added a ``get_include()`` function to the Python module that returns the path |
| 140 | of the directory containing the installed pybind11 header files |
Wenzel Jakob | 1c329aa | 2016-04-13 02:37:36 +0200 | [diff] [blame] | 141 | * Documentation improvements: import issues, symbol visibility, pickling, limitations |
Wenzel Jakob | dbe43ff | 2016-04-21 12:21:14 +0200 | [diff] [blame] | 142 | * Added casting support for ``std::reference_wrapper<>`` |
Wenzel Jakob | 2c5d560 | 2016-04-11 18:46:11 +0200 | [diff] [blame] | 143 | |
Wenzel Jakob | 33c2a04 | 2016-04-07 09:06:49 +0200 | [diff] [blame] | 144 | 1.4 (April 7, 2016) |
Wenzel Jakob | d2385e8 | 2016-03-08 18:04:43 +0100 | [diff] [blame] | 145 | -------------------------- |
Wenzel Jakob | 81dfd2c | 2016-03-08 19:40:32 +0100 | [diff] [blame] | 146 | * Transparent type conversion for ``std::wstring`` and ``wchar_t`` |
Wenzel Jakob | 0e6ca59 | 2016-04-07 08:49:37 +0200 | [diff] [blame] | 147 | * Allow passing ``nullptr``-valued strings |
Wenzel Jakob | 3411673 | 2016-04-06 17:55:41 +0200 | [diff] [blame] | 148 | * Transparent passing of ``void *`` pointers using capsules |
Wenzel Jakob | 0e6ca59 | 2016-04-07 08:49:37 +0200 | [diff] [blame] | 149 | * Transparent support for returning values wrapped in ``std::unique_ptr<>`` |
Wenzel Jakob | 4e455dd | 2016-03-09 16:38:28 +0100 | [diff] [blame] | 150 | * Improved docstring generation for compatibility with Sphinx |
Wenzel Jakob | 3411673 | 2016-04-06 17:55:41 +0200 | [diff] [blame] | 151 | * Nicer debug error message when default parameter construction fails |
| 152 | * Support for "opaque" types that bypass the transparent conversion layer for STL containers |
| 153 | * Redesigned type casting interface to avoid ambiguities that could occasionally cause compiler errors |
Wenzel Jakob | 2c5d560 | 2016-04-11 18:46:11 +0200 | [diff] [blame] | 154 | * Redesigned property implementation; fixes crashes due to an unfortunate default return value policy |
Wenzel Jakob | 4e455dd | 2016-03-09 16:38:28 +0100 | [diff] [blame] | 155 | * Anaconda package generation support |
Wenzel Jakob | d2385e8 | 2016-03-08 18:04:43 +0100 | [diff] [blame] | 156 | |
| 157 | 1.3 (March 8, 2016) |
Wenzel Jakob | 8ed2808 | 2016-02-07 17:32:37 +0100 | [diff] [blame] | 158 | -------------------------- |
Wenzel Jakob | cf2b87a | 2016-02-22 17:32:44 +0100 | [diff] [blame] | 159 | |
| 160 | * Added support for the Intel C++ compiler (v15+) |
| 161 | * Added support for the STL unordered set/map data structures |
Wenzel Jakob | d2385e8 | 2016-03-08 18:04:43 +0100 | [diff] [blame] | 162 | * Added support for the STL linked list data structure |
Wenzel Jakob | cf2b87a | 2016-02-22 17:32:44 +0100 | [diff] [blame] | 163 | * NumPy-style broadcasting support in ``pybind11::vectorize`` |
Wenzel Jakob | 2c5d560 | 2016-04-11 18:46:11 +0200 | [diff] [blame] | 164 | * pybind11 now displays more verbose error messages when ``arg::operator=()`` fails |
Wenzel Jakob | d2385e8 | 2016-03-08 18:04:43 +0100 | [diff] [blame] | 165 | * pybind11 internal data structures now live in a version-dependent namespace to avoid ABI issues |
| 166 | * Many, many bugfixes involving corner cases and advanced usage |
Wenzel Jakob | 8ed2808 | 2016-02-07 17:32:37 +0100 | [diff] [blame] | 167 | |
| 168 | 1.2 (February 7, 2016) |
Wenzel Jakob | 1ae77fe | 2016-01-17 22:36:43 +0100 | [diff] [blame] | 169 | -------------------------- |
Wenzel Jakob | 48548ea | 2016-01-17 22:36:44 +0100 | [diff] [blame] | 170 | |
Wenzel Jakob | 1ae77fe | 2016-01-17 22:36:43 +0100 | [diff] [blame] | 171 | * Optional: efficient generation of function signatures at compile time using C++14 |
Wenzel Jakob | 48548ea | 2016-01-17 22:36:44 +0100 | [diff] [blame] | 172 | * Switched to a simpler and more general way of dealing with function default |
| 173 | arguments. Unused keyword arguments in function calls are now detected and |
| 174 | cause errors as expected |
Wenzel Jakob | 1ae77fe | 2016-01-17 22:36:43 +0100 | [diff] [blame] | 175 | * New ``keep_alive`` call policy analogous to Boost.Python's ``with_custodian_and_ward`` |
Wenzel Jakob | 48548ea | 2016-01-17 22:36:44 +0100 | [diff] [blame] | 176 | * New ``pybind11::base<>`` attribute to indicate a subclass relationship |
Wenzel Jakob | 1ae77fe | 2016-01-17 22:36:43 +0100 | [diff] [blame] | 177 | * Improved interface for RAII type wrappers in ``pytypes.h`` |
| 178 | * Use RAII type wrappers consistently within pybind11 itself. This |
| 179 | fixes various potential refcount leaks when exceptions occur |
Wenzel Jakob | 2c5d560 | 2016-04-11 18:46:11 +0200 | [diff] [blame] | 180 | * Added new ``bytes`` RAII type wrapper (maps to ``string`` in Python 2.7) |
Wenzel Jakob | 48548ea | 2016-01-17 22:36:44 +0100 | [diff] [blame] | 181 | * Made handle and related RAII classes const correct, using them more |
| 182 | consistently everywhere now |
Wenzel Jakob | 1ae77fe | 2016-01-17 22:36:43 +0100 | [diff] [blame] | 183 | * Got rid of the ugly ``__pybind11__`` attributes on the Python side---they are |
| 184 | now stored in a C++ hash table that is not visible in Python |
| 185 | * Fixed refcount leaks involving NumPy arrays and bound functions |
| 186 | * Vastly improved handling of shared/smart pointers |
| 187 | * Removed an unnecessary copy operation in ``pybind11::vectorize`` |
| 188 | * Fixed naming clashes when both pybind11 and NumPy headers are included |
| 189 | * Added conversions for additional exception types |
Wenzel Jakob | 48548ea | 2016-01-17 22:36:44 +0100 | [diff] [blame] | 190 | * Documentation improvements (using multiple extension modules, smart pointers, |
| 191 | other minor clarifications) |
Wenzel Jakob | 6158716 | 2016-01-18 22:38:52 +0100 | [diff] [blame] | 192 | * unified infrastructure for parsing variadic arguments in ``class_`` and cpp_function |
Wenzel Jakob | 1ae77fe | 2016-01-17 22:36:43 +0100 | [diff] [blame] | 193 | * Fixed license text (was: ZLIB, should have been: 3-clause BSD) |
| 194 | * Python 3.2 compatibility |
Wenzel Jakob | cd4e6ae | 2016-01-29 11:48:40 +0100 | [diff] [blame] | 195 | * Fixed remaining issues when accessing types in another plugin module |
| 196 | * Added enum comparison and casting methods |
| 197 | * Improved SFINAE-based detection of whether types are copy-constructible |
| 198 | * Eliminated many warnings about unused variables and the use of ``offsetof()`` |
Wenzel Jakob | 8ed2808 | 2016-02-07 17:32:37 +0100 | [diff] [blame] | 199 | * Support for ``std::array<>`` conversions |
Wenzel Jakob | 1ae77fe | 2016-01-17 22:36:43 +0100 | [diff] [blame] | 200 | |
| 201 | 1.1 (December 7, 2015) |
| 202 | -------------------------- |
| 203 | |
| 204 | * Documentation improvements (GIL, wrapping functions, casting, fixed many typos) |
| 205 | * Generalized conversion of integer types |
| 206 | * Improved support for casting function objects |
| 207 | * Improved support for ``std::shared_ptr<>`` conversions |
| 208 | * Initial support for ``std::set<>`` conversions |
| 209 | * Fixed type resolution issue for types defined in a separate plugin module |
| 210 | * Cmake build system improvements |
| 211 | * Factored out generic functionality to non-templated code (smaller code size) |
| 212 | * Added a code size / compile time benchmark vs Boost.Python |
| 213 | * Added an appveyor CI script |
| 214 | |
| 215 | 1.0 (October 15, 2015) |
| 216 | ------------------------ |
| 217 | * Initial release |