| Wenzel Jakob | 1ae77fe | 2016-01-17 22:36:43 +0100 | [diff] [blame] | 1 | .. _changelog: |
| 2 | |
| 3 | Changelog |
| 4 | ######### |
| 5 | |
| Wenzel Jakob | ed52f46 | 2016-12-26 13:18:26 +0100 | [diff] [blame] | 6 | Starting with version 1.8.0, pybind11 releases use a `semantic versioning |
| Wenzel Jakob | d3549d6 | 2016-12-23 16:01:04 +0100 | [diff] [blame] | 7 | <http://semver.org>`_ policy. |
| Wenzel Jakob | f950215 | 2016-06-14 15:00:46 +0200 | [diff] [blame] | 8 | |
| Wenzel Jakob | d405b1b | 2017-03-22 22:20:07 +0100 | [diff] [blame] | 9 | v2.2.0 (Not yet released) |
| 10 | ----------------------------------------------------- |
| 11 | |
| 12 | * TBD |
| 13 | |
| Wenzel Jakob | db20095 | 2017-04-07 02:03:46 +0200 | [diff] [blame] | 14 | v2.1.1 (April 7, 2017) |
| 15 | ----------------------------------------------------- |
| 16 | |
| 17 | * Fixed minimum version requirement for MSVC 2015u3 |
| 18 | `#773 <https://github.com/pybind/pybind11/pull/773>`_. |
| 19 | |
| Wenzel Jakob | d405b1b | 2017-03-22 22:20:07 +0100 | [diff] [blame] | 20 | v2.1.0 (March 22, 2017) |
| Wenzel Jakob | a9730be | 2017-01-06 14:18:44 +0100 | [diff] [blame] | 21 | ----------------------------------------------------- |
| 22 | |
| Wenzel Jakob | 62e5fef | 2017-03-22 22:07:45 +0100 | [diff] [blame] | 23 | * pybind11 now performs function overload resolution in two phases. The first |
| 24 | phase only considers exact type matches, while the second allows for implicit |
| 25 | conversions to take place. A special ``noconvert()`` syntax can be used to |
| 26 | completely disable implicit conversions for specific arguments. |
| 27 | `#643 <https://github.com/pybind/pybind11/pull/643>`_, |
| 28 | `#634 <https://github.com/pybind/pybind11/pull/634>`_, |
| 29 | `#650 <https://github.com/pybind/pybind11/pull/650>`_. |
| 30 | |
| 31 | * Fixed a regression where static properties no longer worked with classes |
| 32 | using multiple inheritance. The ``py::metaclass`` attribute is no longer |
| 33 | necessary (and deprecated as of this release) when binding classes with |
| 34 | static properties. |
| 35 | `#679 <https://github.com/pybind/pybind11/pull/679>`_, |
| 36 | |
| 37 | * Classes bound using ``pybind11`` can now use custom metaclasses. |
| 38 | `#679 <https://github.com/pybind/pybind11/pull/679>`_, |
| 39 | |
| 40 | * ``py::args`` and ``py::kwargs`` can now be mixed with other positional |
| 41 | arguments when binding functions using pybind11. |
| 42 | `#611 <https://github.com/pybind/pybind11/pull/611>`_. |
| 43 | |
| 44 | * Improved support for C++11 unicode string and character types; added |
| 45 | extensive documentation regarding pybind11's string conversion behavior. |
| 46 | `#624 <https://github.com/pybind/pybind11/pull/624>`_, |
| 47 | `#636 <https://github.com/pybind/pybind11/pull/636>`_, |
| 48 | `#715 <https://github.com/pybind/pybind11/pull/715>`_. |
| 49 | |
| 50 | * pybind11 can now avoid expensive copies when converting Eigen arrays to NumPy |
| 51 | arrays (and vice versa). `#610 <https://github.com/pybind/pybind11/pull/610>`_. |
| 52 | |
| 53 | * The "fast path" in ``py::vectorize`` now works for any full-size group of C or |
| 54 | F-contiguous arrays. The non-fast path is also faster since it no longer performs |
| 55 | copies of the input arguments (except when type conversions are necessary). |
| 56 | `#610 <https://github.com/pybind/pybind11/pull/610>`_. |
| 57 | |
| 58 | * Added fast, unchecked access to NumPy arrays via a proxy object. |
| 59 | `#746 <https://github.com/pybind/pybind11/pull/746>`_. |
| 60 | |
| Wenzel Jakob | 0d92938 | 2017-03-22 22:52:29 +0100 | [diff] [blame] | 61 | * Transparent support for class-specific ``operator new`` and |
| Wenzel Jakob | 62e5fef | 2017-03-22 22:07:45 +0100 | [diff] [blame] | 62 | ``operator delete`` implementations. |
| 63 | `#755 <https://github.com/pybind/pybind11/pull/755>`_. |
| 64 | |
| 65 | * Slimmer and more efficient STL-compatible iterator interface for sequence types. |
| 66 | `#662 <https://github.com/pybind/pybind11/pull/662>`_. |
| 67 | |
| 68 | * Improved custom holder type support. |
| 69 | `#607 <https://github.com/pybind/pybind11/pull/607>`_. |
| 70 | |
| 71 | * ``nullptr`` to ``None`` conversion fixed in various builtin type casters. |
| 72 | `#732 <https://github.com/pybind/pybind11/pull/732>`_. |
| 73 | |
| 74 | * ``enum_`` now exposes its members via a special ``__members__`` attribute. |
| 75 | `#666 <https://github.com/pybind/pybind11/pull/666>`_. |
| 76 | |
| 77 | * ``std::vector`` bindings created using ``stl_bind.h`` can now optionally |
| 78 | implement the buffer protocol. `#488 <https://github.com/pybind/pybind11/pull/488>`_. |
| 79 | |
| 80 | * Automated C++ reference documentation using doxygen and breathe. |
| 81 | `#598 <https://github.com/pybind/pybind11/pull/598>`_. |
| 82 | |
| 83 | * Added minimum compiler version assertions. |
| 84 | `#727 <https://github.com/pybind/pybind11/pull/727>`_. |
| 85 | |
| 86 | * Improved compatibility with C++1z. |
| 87 | `#677 <https://github.com/pybind/pybind11/pull/677>`_. |
| 88 | |
| 89 | * Improved ``py::capsule`` API. Can be used to implement cleanup |
| 90 | callbacks that are involved at module destruction time. |
| 91 | `#752 <https://github.com/pybind/pybind11/pull/752>`_. |
| 92 | |
| 93 | * Various minor improvements and fixes. |
| 94 | `#595 <https://github.com/pybind/pybind11/pull/595>`_, |
| 95 | `#588 <https://github.com/pybind/pybind11/pull/588>`_, |
| 96 | `#589 <https://github.com/pybind/pybind11/pull/589>`_, |
| 97 | `#603 <https://github.com/pybind/pybind11/pull/603>`_, |
| 98 | `#619 <https://github.com/pybind/pybind11/pull/619>`_, |
| 99 | `#648 <https://github.com/pybind/pybind11/pull/648>`_, |
| 100 | `#695 <https://github.com/pybind/pybind11/pull/695>`_, |
| 101 | `#720 <https://github.com/pybind/pybind11/pull/720>`_, |
| 102 | `#723 <https://github.com/pybind/pybind11/pull/723>`_, |
| 103 | `#729 <https://github.com/pybind/pybind11/pull/729>`_, |
| 104 | `#724 <https://github.com/pybind/pybind11/pull/724>`_, |
| 105 | `#742 <https://github.com/pybind/pybind11/pull/742>`_, |
| 106 | `#753 <https://github.com/pybind/pybind11/pull/753>`_. |
| Wenzel Jakob | a9730be | 2017-01-06 14:18:44 +0100 | [diff] [blame] | 107 | |
| Wenzel Jakob | f8dafe9 | 2017-01-04 15:09:49 +0100 | [diff] [blame] | 108 | v2.0.1 (Jan 4, 2017) |
| 109 | ----------------------------------------------------- |
| 110 | |
| 111 | * Fix pointer to reference error in type_caster on MSVC |
| 112 | `#583 <https://github.com/pybind/pybind11/pull/583>`_. |
| 113 | |
| 114 | * Fixed a segmentation in the test suite due to a typo |
| 115 | `cd7eac <https://github.com/pybind/pybind11/commit/cd7eac>`_. |
| 116 | |
| Wenzel Jakob | e33ef9c | 2017-01-01 13:55:06 +0100 | [diff] [blame] | 117 | v2.0.0 (Jan 1, 2017) |
| Wenzel Jakob | ed52f46 | 2016-12-26 13:18:26 +0100 | [diff] [blame] | 118 | ----------------------------------------------------- |
| 119 | |
| 120 | * Fixed a reference counting regression affecting types with custom metaclasses |
| 121 | (introduced in v2.0.0-rc1). |
| 122 | `#571 <https://github.com/pybind/pybind11/pull/571>`_. |
| 123 | |
| 124 | * Quenched a CMake policy warning. |
| 125 | `#570 <https://github.com/pybind/pybind11/pull/570>`_. |
| 126 | |
| Wenzel Jakob | e33ef9c | 2017-01-01 13:55:06 +0100 | [diff] [blame] | 127 | v2.0.0-rc1 (Dec 23, 2016) |
| Wenzel Jakob | f88af0c | 2016-06-22 13:52:31 +0200 | [diff] [blame] | 128 | ----------------------------------------------------- |
| Wenzel Jakob | 1cbe7ef | 2016-06-14 14:55:10 +0200 | [diff] [blame] | 129 | |
| Wenzel Jakob | d3549d6 | 2016-12-23 16:01:04 +0100 | [diff] [blame] | 130 | The pybind11 developers are excited to issue a release candidate of pybind11 |
| 131 | with a subsequent v2.0.0 release planned in early January next year. |
| Wenzel Jakob | 1cbe7ef | 2016-06-14 14:55:10 +0200 | [diff] [blame] | 132 | |
| Wenzel Jakob | d3549d6 | 2016-12-23 16:01:04 +0100 | [diff] [blame] | 133 | An incredible amount of effort by went into pybind11 over the last ~5 months, |
| 134 | leading to a release that is jam-packed with exciting new features and numerous |
| Wenzel Jakob | f8dafe9 | 2017-01-04 15:09:49 +0100 | [diff] [blame] | 135 | usability improvements. The following list links PRs or individual commits |
| Wenzel Jakob | ed52f46 | 2016-12-26 13:18:26 +0100 | [diff] [blame] | 136 | whenever applicable. |
| Wenzel Jakob | d3549d6 | 2016-12-23 16:01:04 +0100 | [diff] [blame] | 137 | |
| 138 | Happy Christmas! |
| 139 | |
| 140 | * Support for binding C++ class hierarchies that make use of multiple |
| 141 | inheritance. `#410 <https://github.com/pybind/pybind11/pull/410>`_. |
| 142 | |
| 143 | * PyPy support: pybind11 now supports nightly builds of PyPy and will |
| 144 | interoperate with the future 5.7 release. No code changes are necessary, |
| 145 | everything "just" works as usual. Note that we only target the Python 2.7 |
| 146 | branch for now; support for 3.x will be added once its ``cpyext`` extension |
| Wenzel Jakob | ed52f46 | 2016-12-26 13:18:26 +0100 | [diff] [blame] | 147 | support catches up. A few minor features remain unsupported for the time |
| 148 | being (notably dynamic attributes in custom types). |
| 149 | `#527 <https://github.com/pybind/pybind11/pull/527>`_. |
| Wenzel Jakob | d3549d6 | 2016-12-23 16:01:04 +0100 | [diff] [blame] | 150 | |
| 151 | * Significant work on the documentation -- in particular, the monolitic |
| 152 | ``advanced.rst`` file was restructured into a easier to read hierarchical |
| 153 | organization. `#448 <https://github.com/pybind/pybind11/pull/448>`_. |
| 154 | |
| 155 | * Many NumPy-related improvements: |
| 156 | |
| 157 | 1. Object-oriented API to access and modify NumPy ``ndarray`` instances, |
| 158 | replicating much of the corresponding NumPy C API functionality. |
| 159 | `#402 <https://github.com/pybind/pybind11/pull/402>`_. |
| 160 | |
| 161 | 2. NumPy array ``dtype`` array descriptors are now first-class citizens and |
| 162 | are exposed via a new class ``py::dtype``. |
| 163 | |
| 164 | 3. Structured dtypes can be registered using the ``PYBIND11_NUMPY_DTYPE()`` |
| 165 | macro. Special ``array`` constructors accepting dtype objects were also |
| 166 | added. |
| 167 | |
| 168 | One potential caveat involving this change: format descriptor strings |
| 169 | should now be accessed via ``format_descriptor::format()`` (however, for |
| 170 | compatibility purposes, the old syntax ``format_descriptor::value`` will |
| 171 | still work for non-structured data types). `#308 |
| 172 | <https://github.com/pybind/pybind11/pull/308>`_. |
| 173 | |
| 174 | 4. Further improvements to support structured dtypes throughout the system. |
| 175 | `#472 <https://github.com/pybind/pybind11/pull/472>`_, |
| 176 | `#474 <https://github.com/pybind/pybind11/pull/474>`_, |
| 177 | `#459 <https://github.com/pybind/pybind11/pull/459>`_, |
| 178 | `#453 <https://github.com/pybind/pybind11/pull/453>`_, |
| 179 | `#452 <https://github.com/pybind/pybind11/pull/452>`_, and |
| 180 | `#505 <https://github.com/pybind/pybind11/pull/505>`_. |
| 181 | |
| 182 | 5. Fast access operators. `#497 <https://github.com/pybind/pybind11/pull/497>`_. |
| 183 | |
| 184 | 6. Constructors for arrays whose storage is owned by another object. |
| 185 | `#440 <https://github.com/pybind/pybind11/pull/440>`_. |
| 186 | |
| 187 | 7. Added constructors for ``array`` and ``array_t`` explicitly accepting shape |
| 188 | and strides; if strides are not provided, they are deduced assuming |
| 189 | C-contiguity. Also added simplified constructors for 1-dimensional case. |
| 190 | |
| 191 | 8. Added buffer/NumPy support for ``char[N]`` and ``std::array<char, N>`` types. |
| 192 | |
| 193 | 9. Added ``memoryview`` wrapper type which is constructible from ``buffer_info``. |
| 194 | |
| 195 | * Eigen: many additional conversions and support for non-contiguous |
| 196 | arrays/slices. |
| 197 | `#427 <https://github.com/pybind/pybind11/pull/427>`_, |
| 198 | `#315 <https://github.com/pybind/pybind11/pull/315>`_, |
| 199 | `#316 <https://github.com/pybind/pybind11/pull/316>`_, |
| 200 | `#312 <https://github.com/pybind/pybind11/pull/312>`_, and |
| 201 | `#267 <https://github.com/pybind/pybind11/pull/267>`_ |
| 202 | |
| 203 | * Incompatible changes in ``class_<...>::class_()``: |
| 204 | |
| 205 | 1. Declarations of types that provide access via the buffer protocol must |
| 206 | now include the ``py::buffer_protocol()`` annotation as an argument to |
| 207 | the ``class_`` constructor. |
| 208 | |
| 209 | 2. Declarations of types that require a custom metaclass (i.e. all classes |
| 210 | which include static properties via commands such as |
| 211 | ``def_readwrite_static()``) must now include the ``py::metaclass()`` |
| 212 | annotation as an argument to the ``class_`` constructor. |
| 213 | |
| 214 | These two changes were necessary to make type definitions in pybind11 |
| 215 | future-proof, and to support PyPy via its cpyext mechanism. `#527 |
| 216 | <https://github.com/pybind/pybind11/pull/527>`_. |
| 217 | |
| 218 | |
| 219 | 3. This version of pybind11 uses a redesigned mechnism for instantiating |
| 220 | trempoline classes that are used to override virtual methods from within |
| 221 | Python. This led to the following user-visible syntax change: instead of |
| 222 | |
| 223 | .. code-block:: cpp |
| 224 | |
| 225 | py::class_<TrampolineClass>("MyClass") |
| 226 | .alias<MyClass>() |
| 227 | .... |
| 228 | |
| 229 | write |
| 230 | |
| 231 | .. code-block:: cpp |
| 232 | |
| 233 | py::class_<MyClass, TrampolineClass>("MyClass") |
| 234 | .... |
| 235 | |
| 236 | Importantly, both the original and the trampoline class are now |
| 237 | specified as an arguments (in arbitrary order) to the ``py::class_`` |
| 238 | template, and the ``alias<..>()`` call is gone. The new scheme has zero |
| 239 | overhead in cases when Python doesn't override any functions of the |
| 240 | underlying C++ class. `rev. 86d825 |
| 241 | <https://github.com/pybind/pybind11/commit/86d825>`_. |
| 242 | |
| Wenzel Jakob | e6b2f75 | 2016-07-10 10:54:46 +0200 | [diff] [blame] | 243 | * Added ``eval`` and ``eval_file`` functions for evaluating expressions and |
| Wenzel Jakob | d3549d6 | 2016-12-23 16:01:04 +0100 | [diff] [blame] | 244 | statements from a string or file. `rev. 0d3fc3 |
| 245 | <https://github.com/pybind/pybind11/commit/0d3fc3>`_. |
| 246 | |
| 247 | * pybind11 can now create types with a modifiable dictionary. |
| 248 | `#437 <https://github.com/pybind/pybind11/pull/437>`_ and |
| 249 | `#444 <https://github.com/pybind/pybind11/pull/444>`_. |
| 250 | |
| 251 | * Support for translation of arbitrary C++ exceptions to Python counterparts. |
| 252 | `#296 <https://github.com/pybind/pybind11/pull/296>`_ and |
| 253 | `#273 <https://github.com/pybind/pybind11/pull/273>`_. |
| 254 | |
| 255 | * Report full backtraces through mixed C++/Python code, better reporting for |
| 256 | import errors, fixed GIL management in exception processing. |
| 257 | `#537 <https://github.com/pybind/pybind11/pull/537>`_, |
| 258 | `#494 <https://github.com/pybind/pybind11/pull/494>`_, |
| 259 | `rev. e72d95 <https://github.com/pybind/pybind11/commit/e72d95>`_, and |
| 260 | `rev. 099d6e <https://github.com/pybind/pybind11/commit/099d6e>`_. |
| 261 | |
| 262 | * Support for bit-level operations, comparisons, and serialization of C++ |
| 263 | enumerations. `#503 <https://github.com/pybind/pybind11/pull/503>`_, |
| 264 | `#508 <https://github.com/pybind/pybind11/pull/508>`_, |
| 265 | `#380 <https://github.com/pybind/pybind11/pull/380>`_, |
| 266 | `#309 <https://github.com/pybind/pybind11/pull/309>`_. |
| 267 | `#311 <https://github.com/pybind/pybind11/pull/311>`_. |
| 268 | |
| 269 | * The ``class_`` constructor now accepts its template arguments in any order. |
| 270 | `#385 <https://github.com/pybind/pybind11/pull/385>`_. |
| 271 | |
| 272 | * Attribute and item accessors now have a more complete interface which makes |
| 273 | it possible to chain attributes as in |
| 274 | ``obj.attr("a")[key].attr("b").attr("method")(1, 2, 3)``. `#425 |
| 275 | <https://github.com/pybind/pybind11/pull/425>`_. |
| 276 | |
| 277 | * Major redesign of the default and conversion constructors in ``pytypes.h``. |
| 278 | `#464 <https://github.com/pybind/pybind11/pull/464>`_. |
| 279 | |
| 280 | * Added built-in support for ``std::shared_ptr`` holder type. It is no longer |
| 281 | necessary to to include a declaration of the form |
| 282 | ``PYBIND11_DECLARE_HOLDER_TYPE(T, std::shared_ptr<T>)`` (though continuing to |
| 283 | do so won't cause an error). |
| 284 | `#454 <https://github.com/pybind/pybind11/pull/454>`_. |
| 285 | |
| 286 | * New ``py::overload_cast`` casting operator to select among multiple possible |
| 287 | overloads of a function. An example: |
| 288 | |
| 289 | .. code-block:: cpp |
| 290 | |
| 291 | py::class_<Pet>(m, "Pet") |
| 292 | .def("set", py::overload_cast<int>(&Pet::set), "Set the pet's age") |
| 293 | .def("set", py::overload_cast<const std::string &>(&Pet::set), "Set the pet's name"); |
| 294 | |
| 295 | This feature only works on C++14-capable compilers. |
| 296 | `#541 <https://github.com/pybind/pybind11/pull/541>`_. |
| 297 | |
| 298 | * C++ types are automatically cast to Python types, e.g. when assigning |
| 299 | them as an attribute. For instance, the following is now legal: |
| 300 | |
| 301 | .. code-block:: cpp |
| 302 | |
| 303 | py::module m = /* ... */ |
| 304 | m.attr("constant") = 123; |
| 305 | |
| 306 | (Previously, a ``py::cast`` call was necessary to avoid a compilation error.) |
| 307 | `#551 <https://github.com/pybind/pybind11/pull/551>`_. |
| 308 | |
| 309 | * Redesigned ``pytest``-based test suite. `#321 <https://github.com/pybind/pybind11/pull/321>`_. |
| 310 | |
| 311 | * Instance tracking to detect reference leaks in test suite. `#324 <https://github.com/pybind/pybind11/pull/324>`_ |
| 312 | |
| 313 | * pybind11 can now distinguish between multiple different instances that are |
| 314 | located at the same memory address, but which have different types. |
| 315 | `#329 <https://github.com/pybind/pybind11/pull/329>`_. |
| 316 | |
| 317 | * Improved logic in ``move`` return value policy. |
| 318 | `#510 <https://github.com/pybind/pybind11/pull/510>`_, |
| 319 | `#297 <https://github.com/pybind/pybind11/pull/297>`_. |
| 320 | |
| 321 | * Generalized unpacking API to permit calling Python functions from C++ using |
| 322 | notation such as ``foo(a1, a2, *args, "ka"_a=1, "kb"_a=2, **kwargs)``. `#372 <https://github.com/pybind/pybind11/pull/372>`_. |
| 323 | |
| 324 | * ``py::print()`` function whose behavior matches that of the native Python |
| 325 | ``print()`` function. `#372 <https://github.com/pybind/pybind11/pull/372>`_. |
| 326 | |
| 327 | * Added ``py::dict`` keyword constructor:``auto d = dict("number"_a=42, |
| 328 | "name"_a="World");``. `#372 <https://github.com/pybind/pybind11/pull/372>`_. |
| 329 | |
| 330 | * Added ``py::str::format()`` method and ``_s`` literal: ``py::str s = "1 + 2 |
| 331 | = {}"_s.format(3);``. `#372 <https://github.com/pybind/pybind11/pull/372>`_. |
| 332 | |
| 333 | * Added ``py::repr()`` function which is equivalent to Python's builtin |
| 334 | ``repr()``. `#333 <https://github.com/pybind/pybind11/pull/333>`_. |
| 335 | |
| 336 | * Improved construction and destruction logic for holder types. It is now |
| 337 | possible to reference instances with smart pointer holder types without |
| 338 | constructing the holder if desired. The ``PYBIND11_DECLARE_HOLDER_TYPE`` |
| 339 | macro now accepts an optional second parameter to indicate whether the holder |
| 340 | type uses intrusive reference counting. |
| 341 | `#533 <https://github.com/pybind/pybind11/pull/533>`_ and |
| 342 | `#561 <https://github.com/pybind/pybind11/pull/561>`_. |
| 343 | |
| 344 | * Mapping a stateless C++ function to Python and back is now "for free" (i.e. |
| 345 | no extra indirections or argument conversion overheads). `rev. 954b79 |
| 346 | <https://github.com/pybind/pybind11/commit/954b79>`_. |
| 347 | |
| 348 | * Bindings for ``std::valarray<T>``. |
| 349 | `#545 <https://github.com/pybind/pybind11/pull/545>`_. |
| 350 | |
| 351 | * Improved support for C++17 capable compilers. |
| 352 | `#562 <https://github.com/pybind/pybind11/pull/562>`_. |
| 353 | |
| 354 | * Bindings for ``std::optional<t>``. |
| 355 | `#475 <https://github.com/pybind/pybind11/pull/475>`_, |
| 356 | `#476 <https://github.com/pybind/pybind11/pull/476>`_, |
| 357 | `#479 <https://github.com/pybind/pybind11/pull/479>`_, |
| 358 | `#499 <https://github.com/pybind/pybind11/pull/499>`_, and |
| 359 | `#501 <https://github.com/pybind/pybind11/pull/501>`_. |
| 360 | |
| 361 | * ``stl_bind.h``: general improvements and support for ``std::map`` and |
| 362 | ``std::unordered_map``. |
| 363 | `#490 <https://github.com/pybind/pybind11/pull/490>`_, |
| 364 | `#282 <https://github.com/pybind/pybind11/pull/282>`_, |
| 365 | `#235 <https://github.com/pybind/pybind11/pull/235>`_. |
| 366 | |
| 367 | * The ``std::tuple``, ``std::pair``, ``std::list``, and ``std::vector`` type |
| 368 | casters now accept any Python sequence type as input. `rev. 107285 |
| 369 | <https://github.com/pybind/pybind11/commit/107285>`_. |
| 370 | |
| 371 | * Improved CMake Python detection on multi-architecture Linux. |
| 372 | `#532 <https://github.com/pybind/pybind11/pull/532>`_. |
| 373 | |
| 374 | * Infrastructure to selectively disable or enable parts of the automatically |
| 375 | generated docstrings. `#486 <https://github.com/pybind/pybind11/pull/486>`_. |
| 376 | |
| 377 | * ``reference`` and ``reference_internal`` are now the default return value |
| 378 | properties for static and non-static properties, respectively. `#473 |
| 379 | <https://github.com/pybind/pybind11/pull/473>`_. (the previous defaults |
| 380 | were ``automatic``). `#473 <https://github.com/pybind/pybind11/pull/473>`_. |
| 381 | |
| 382 | * Support for ``std::unique_ptr`` with non-default deleters or no deleter at |
| 383 | all (``py::nodelete``). `#384 <https://github.com/pybind/pybind11/pull/384>`_. |
| 384 | |
| Wenzel Jakob | 3c79671 | 2016-12-23 16:19:36 +0100 | [diff] [blame] | 385 | * Deprecated ``handle::call()`` method. The new syntax to call Python |
| 386 | functions is simply ``handle()``. It can also be invoked explicitly via |
| Wenzel Jakob | d3549d6 | 2016-12-23 16:01:04 +0100 | [diff] [blame] | 387 | ``handle::operator<X>()``, where ``X`` is an optional return value policy. |
| 388 | |
| 389 | * Print more informative error messages when ``make_tuple()`` or ``cast()`` |
| 390 | fail. `#262 <https://github.com/pybind/pybind11/pull/262>`_. |
| 391 | |
| 392 | * Creation of holder types for classes deriving from |
| 393 | ``std::enable_shared_from_this<>`` now also works for ``const`` values. |
| 394 | `#260 <https://github.com/pybind/pybind11/pull/260>`_. |
| 395 | |
| 396 | * ``make_iterator()`` improvements for better compatibility with various |
| 397 | types (now uses prefix increment operator); it now also accepts iterators |
| 398 | with different begin/end types as long as they are equality comparable. |
| 399 | `#247 <https://github.com/pybind/pybind11/pull/247>`_. |
| 400 | |
| 401 | * ``arg()`` now accepts a wider range of argument types for default values. |
| 402 | `#244 <https://github.com/pybind/pybind11/pull/244>`_. |
| 403 | |
| 404 | * Support ``keep_alive`` where the nurse object may be ``None``. `#341 |
| 405 | <https://github.com/pybind/pybind11/pull/341>`_. |
| 406 | |
| 407 | * Added constructors for ``str`` and ``bytes`` from zero-terminated char |
| 408 | pointers, and from char pointers and length. Added constructors for ``str`` |
| 409 | from ``bytes`` and for ``bytes`` from ``str``, which will perform UTF-8 |
| 410 | decoding/encoding as required. |
| 411 | |
| 412 | * Many other improvements of library internals without user-visible changes |
| 413 | |
| Wenzel Jakob | a720a60 | 2016-07-12 18:02:13 +0200 | [diff] [blame] | 414 | |
| 415 | 1.8.1 (July 12, 2016) |
| 416 | ---------------------- |
| Wenzel Jakob | c47d498 | 2016-07-11 23:40:28 +0200 | [diff] [blame] | 417 | * Fixed a rare but potentially very severe issue when the garbage collector ran |
| 418 | during pybind11 type creation. |
| Wenzel Jakob | 1cbe7ef | 2016-06-14 14:55:10 +0200 | [diff] [blame] | 419 | |
| Wenzel Jakob | f950215 | 2016-06-14 15:00:46 +0200 | [diff] [blame] | 420 | 1.8.0 (June 14, 2016) |
| Wenzel Jakob | 1cbe7ef | 2016-06-14 14:55:10 +0200 | [diff] [blame] | 421 | ---------------------- |
| 422 | * Redesigned CMake build system which exports a convenient |
| 423 | ``pybind11_add_module`` function to parent projects. |
| 424 | * ``std::vector<>`` type bindings analogous to Boost.Python's ``indexing_suite`` |
| 425 | * Transparent conversion of sparse and dense Eigen matrices and vectors (``eigen.h``) |
| 426 | * Added an ``ExtraFlags`` template argument to the NumPy ``array_t<>`` wrapper |
| 427 | to disable an enforced cast that may lose precision, e.g. to create overloads |
| 428 | for different precisions and complex vs real-valued matrices. |
| Wenzel Jakob | 3f200fa | 2016-05-17 15:35:29 +0200 | [diff] [blame] | 429 | * Prevent implicit conversion of floating point values to integral types in |
| 430 | function arguments |
| Wenzel Jakob | 163ac2e | 2016-05-03 14:16:18 +0200 | [diff] [blame] | 431 | * Fixed incorrect default return value policy for functions returning a shared |
| 432 | pointer |
| Wenzel Jakob | 38d8b8c | 2016-05-31 09:53:28 +0200 | [diff] [blame] | 433 | * Don't allow registering a type via ``class_`` twice |
| Wenzel Jakob | 163ac2e | 2016-05-03 14:16:18 +0200 | [diff] [blame] | 434 | * Don't allow casting a ``None`` value into a C++ lvalue reference |
| 435 | * Fixed a crash in ``enum_::operator==`` that was triggered by the ``help()`` command |
| 436 | * Improved detection of whether or not custom C++ types can be copy/move-constructed |
| 437 | * Extended ``str`` type to also work with ``bytes`` instances |
| Wenzel Jakob | 1cbe7ef | 2016-06-14 14:55:10 +0200 | [diff] [blame] | 438 | * Added a ``"name"_a`` user defined string literal that is equivalent to ``py::arg("name")``. |
| 439 | * When specifying function arguments via ``py::arg``, the test that verifies |
| 440 | the number of arguments now runs at compile time. |
| Wenzel Jakob | 163ac2e | 2016-05-03 14:16:18 +0200 | [diff] [blame] | 441 | * Added ``[[noreturn]]`` attribute to ``pybind11_fail()`` to quench some |
| 442 | compiler warnings |
| Wenzel Jakob | 86d825f | 2016-05-26 13:19:27 +0200 | [diff] [blame] | 443 | * List function arguments in exception text when the dispatch code cannot find |
| 444 | a matching overload |
| Wenzel Jakob | 1cbe7ef | 2016-06-14 14:55:10 +0200 | [diff] [blame] | 445 | * Added ``PYBIND11_OVERLOAD_NAME`` and ``PYBIND11_OVERLOAD_PURE_NAME`` macros which |
| Wenzel Jakob | f950215 | 2016-06-14 15:00:46 +0200 | [diff] [blame] | 446 | 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] | 447 | (e.g. ``__call__`` and ``operator()``) |
| Wenzel Jakob | 163ac2e | 2016-05-03 14:16:18 +0200 | [diff] [blame] | 448 | * Various minor ``iterator`` and ``make_iterator()`` improvements |
| Wenzel Jakob | 86d825f | 2016-05-26 13:19:27 +0200 | [diff] [blame] | 449 | * Transparently support ``__bool__`` on Python 2.x and Python 3.x |
| 450 | * Fixed issue with destructor of unpickled object not being called |
| Wenzel Jakob | 163ac2e | 2016-05-03 14:16:18 +0200 | [diff] [blame] | 451 | * Minor CMake build system improvements on Windows |
| Wenzel Jakob | 86d825f | 2016-05-26 13:19:27 +0200 | [diff] [blame] | 452 | * New ``pybind11::args`` and ``pybind11::kwargs`` types to create functions which |
| 453 | take an arbitrary number of arguments and keyword arguments |
| 454 | * 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] | 455 | * The functions ``def_property_*`` now correctly process docstring arguments (these |
| 456 | formerly caused a segmentation fault) |
| 457 | * Many ``mkdoc.py`` improvements (enumerations, template arguments, ``DOC()`` |
| 458 | macro accepts more arguments) |
| 459 | * Cygwin support |
| 460 | * Documentation improvements (pickling support, ``keep_alive``, macro usage) |
| Wenzel Jakob | c4d7ccd | 2016-04-30 22:00:44 +0200 | [diff] [blame] | 461 | |
| Wenzel Jakob | e70b2ab | 2016-04-30 19:58:33 +0200 | [diff] [blame] | 462 | 1.7 (April 30, 2016) |
| Wenzel Jakob | bb79d7b | 2016-04-21 12:23:20 +0200 | [diff] [blame] | 463 | ---------------------- |
| Wenzel Jakob | 1ac22e3 | 2016-04-25 23:25:40 +0200 | [diff] [blame] | 464 | * 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] | 465 | 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] | 466 | reference is encountered |
| Wenzel Jakob | e84f557 | 2016-04-26 23:19:19 +0200 | [diff] [blame] | 467 | * Significantly more general GIL state routines that are used instead of |
| 468 | Python's troublesome ``PyGILState_Ensure`` and ``PyGILState_Release`` API |
| Wenzel Jakob | dd7ec34 | 2016-04-29 10:06:24 +0200 | [diff] [blame] | 469 | * Redesign of opaque types that drastically simplifies their usage |
| Wenzel Jakob | e70b2ab | 2016-04-30 19:58:33 +0200 | [diff] [blame] | 470 | * Extended ability to pass values of type ``[const] void *`` |
| Wenzel Jakob | 1ac22e3 | 2016-04-25 23:25:40 +0200 | [diff] [blame] | 471 | * ``keep_alive`` fix: don't fail when there is no patient |
| Wenzel Jakob | dd7ec34 | 2016-04-29 10:06:24 +0200 | [diff] [blame] | 472 | * ``functional.h``: acquire the GIL before calling a Python function |
| Wenzel Jakob | 1ac22e3 | 2016-04-25 23:25:40 +0200 | [diff] [blame] | 473 | * Added Python RAII type wrappers ``none`` and ``iterable`` |
| 474 | * Added ``*args`` and ``*kwargs`` pass-through parameters to |
| 475 | ``pybind11.get_include()`` function |
| Wenzel Jakob | dd7ec34 | 2016-04-29 10:06:24 +0200 | [diff] [blame] | 476 | * Iterator improvements and fixes |
| 477 | * Documentation on return value policies and opaque types improved |
| Wenzel Jakob | bb79d7b | 2016-04-21 12:23:20 +0200 | [diff] [blame] | 478 | |
| Wenzel Jakob | e70b2ab | 2016-04-30 19:58:33 +0200 | [diff] [blame] | 479 | 1.6 (April 30, 2016) |
| 480 | ---------------------- |
| 481 | * Skipped due to upload to PyPI gone wrong and inability to recover |
| 482 | (https://github.com/pypa/packaging-problems/issues/74) |
| 483 | |
| Wenzel Jakob | bb79d7b | 2016-04-21 12:23:20 +0200 | [diff] [blame] | 484 | 1.5 (April 21, 2016) |
| Wenzel Jakob | 2c5d560 | 2016-04-11 18:46:11 +0200 | [diff] [blame] | 485 | ---------------------- |
| Wenzel Jakob | c79dbe4 | 2016-04-17 21:54:31 +0200 | [diff] [blame] | 486 | * 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] | 487 | * 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] | 488 | * Added a convenience routine ``make_iterator()`` which turns a range indicated |
| 489 | by a pair of C++ iterators into a iterable Python object |
| 490 | * Added ``len()`` and a variadic ``make_tuple()`` function |
| Wenzel Jakob | b2b44a9 | 2016-04-15 17:50:40 +0200 | [diff] [blame] | 491 | * Addressed a rare issue that could confuse the current virtual function |
| 492 | dispatcher and another that could lead to crashes in multi-threaded |
| 493 | applications |
| Wenzel Jakob | b282595 | 2016-04-13 23:33:00 +0200 | [diff] [blame] | 494 | * Added a ``get_include()`` function to the Python module that returns the path |
| 495 | of the directory containing the installed pybind11 header files |
| Wenzel Jakob | 1c329aa | 2016-04-13 02:37:36 +0200 | [diff] [blame] | 496 | * Documentation improvements: import issues, symbol visibility, pickling, limitations |
| Wenzel Jakob | dbe43ff | 2016-04-21 12:21:14 +0200 | [diff] [blame] | 497 | * Added casting support for ``std::reference_wrapper<>`` |
| Wenzel Jakob | 2c5d560 | 2016-04-11 18:46:11 +0200 | [diff] [blame] | 498 | |
| Wenzel Jakob | 33c2a04 | 2016-04-07 09:06:49 +0200 | [diff] [blame] | 499 | 1.4 (April 7, 2016) |
| Wenzel Jakob | d2385e8 | 2016-03-08 18:04:43 +0100 | [diff] [blame] | 500 | -------------------------- |
| Wenzel Jakob | 81dfd2c | 2016-03-08 19:40:32 +0100 | [diff] [blame] | 501 | * Transparent type conversion for ``std::wstring`` and ``wchar_t`` |
| Wenzel Jakob | 0e6ca59 | 2016-04-07 08:49:37 +0200 | [diff] [blame] | 502 | * Allow passing ``nullptr``-valued strings |
| Wenzel Jakob | 3411673 | 2016-04-06 17:55:41 +0200 | [diff] [blame] | 503 | * Transparent passing of ``void *`` pointers using capsules |
| Wenzel Jakob | 0e6ca59 | 2016-04-07 08:49:37 +0200 | [diff] [blame] | 504 | * Transparent support for returning values wrapped in ``std::unique_ptr<>`` |
| Wenzel Jakob | 4e455dd | 2016-03-09 16:38:28 +0100 | [diff] [blame] | 505 | * Improved docstring generation for compatibility with Sphinx |
| Wenzel Jakob | 3411673 | 2016-04-06 17:55:41 +0200 | [diff] [blame] | 506 | * Nicer debug error message when default parameter construction fails |
| 507 | * Support for "opaque" types that bypass the transparent conversion layer for STL containers |
| 508 | * 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] | 509 | * 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] | 510 | * Anaconda package generation support |
| Wenzel Jakob | d2385e8 | 2016-03-08 18:04:43 +0100 | [diff] [blame] | 511 | |
| 512 | 1.3 (March 8, 2016) |
| Wenzel Jakob | 8ed2808 | 2016-02-07 17:32:37 +0100 | [diff] [blame] | 513 | -------------------------- |
| Wenzel Jakob | cf2b87a | 2016-02-22 17:32:44 +0100 | [diff] [blame] | 514 | |
| 515 | * Added support for the Intel C++ compiler (v15+) |
| 516 | * Added support for the STL unordered set/map data structures |
| Wenzel Jakob | d2385e8 | 2016-03-08 18:04:43 +0100 | [diff] [blame] | 517 | * Added support for the STL linked list data structure |
| Wenzel Jakob | cf2b87a | 2016-02-22 17:32:44 +0100 | [diff] [blame] | 518 | * NumPy-style broadcasting support in ``pybind11::vectorize`` |
| Wenzel Jakob | 2c5d560 | 2016-04-11 18:46:11 +0200 | [diff] [blame] | 519 | * pybind11 now displays more verbose error messages when ``arg::operator=()`` fails |
| Wenzel Jakob | d2385e8 | 2016-03-08 18:04:43 +0100 | [diff] [blame] | 520 | * pybind11 internal data structures now live in a version-dependent namespace to avoid ABI issues |
| 521 | * Many, many bugfixes involving corner cases and advanced usage |
| Wenzel Jakob | 8ed2808 | 2016-02-07 17:32:37 +0100 | [diff] [blame] | 522 | |
| 523 | 1.2 (February 7, 2016) |
| Wenzel Jakob | 1ae77fe | 2016-01-17 22:36:43 +0100 | [diff] [blame] | 524 | -------------------------- |
| Wenzel Jakob | 48548ea | 2016-01-17 22:36:44 +0100 | [diff] [blame] | 525 | |
| Wenzel Jakob | 1ae77fe | 2016-01-17 22:36:43 +0100 | [diff] [blame] | 526 | * Optional: efficient generation of function signatures at compile time using C++14 |
| Wenzel Jakob | 48548ea | 2016-01-17 22:36:44 +0100 | [diff] [blame] | 527 | * Switched to a simpler and more general way of dealing with function default |
| 528 | arguments. Unused keyword arguments in function calls are now detected and |
| 529 | cause errors as expected |
| Wenzel Jakob | 1ae77fe | 2016-01-17 22:36:43 +0100 | [diff] [blame] | 530 | * 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] | 531 | * New ``pybind11::base<>`` attribute to indicate a subclass relationship |
| Wenzel Jakob | 1ae77fe | 2016-01-17 22:36:43 +0100 | [diff] [blame] | 532 | * Improved interface for RAII type wrappers in ``pytypes.h`` |
| 533 | * Use RAII type wrappers consistently within pybind11 itself. This |
| 534 | fixes various potential refcount leaks when exceptions occur |
| Wenzel Jakob | 2c5d560 | 2016-04-11 18:46:11 +0200 | [diff] [blame] | 535 | * 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] | 536 | * Made handle and related RAII classes const correct, using them more |
| 537 | consistently everywhere now |
| Wenzel Jakob | 1ae77fe | 2016-01-17 22:36:43 +0100 | [diff] [blame] | 538 | * Got rid of the ugly ``__pybind11__`` attributes on the Python side---they are |
| 539 | now stored in a C++ hash table that is not visible in Python |
| 540 | * Fixed refcount leaks involving NumPy arrays and bound functions |
| 541 | * Vastly improved handling of shared/smart pointers |
| 542 | * Removed an unnecessary copy operation in ``pybind11::vectorize`` |
| 543 | * Fixed naming clashes when both pybind11 and NumPy headers are included |
| 544 | * Added conversions for additional exception types |
| Wenzel Jakob | 48548ea | 2016-01-17 22:36:44 +0100 | [diff] [blame] | 545 | * Documentation improvements (using multiple extension modules, smart pointers, |
| 546 | other minor clarifications) |
| Wenzel Jakob | 6158716 | 2016-01-18 22:38:52 +0100 | [diff] [blame] | 547 | * unified infrastructure for parsing variadic arguments in ``class_`` and cpp_function |
| Wenzel Jakob | 1ae77fe | 2016-01-17 22:36:43 +0100 | [diff] [blame] | 548 | * Fixed license text (was: ZLIB, should have been: 3-clause BSD) |
| 549 | * Python 3.2 compatibility |
| Wenzel Jakob | cd4e6ae | 2016-01-29 11:48:40 +0100 | [diff] [blame] | 550 | * Fixed remaining issues when accessing types in another plugin module |
| 551 | * Added enum comparison and casting methods |
| 552 | * Improved SFINAE-based detection of whether types are copy-constructible |
| 553 | * Eliminated many warnings about unused variables and the use of ``offsetof()`` |
| Wenzel Jakob | 8ed2808 | 2016-02-07 17:32:37 +0100 | [diff] [blame] | 554 | * Support for ``std::array<>`` conversions |
| Wenzel Jakob | 1ae77fe | 2016-01-17 22:36:43 +0100 | [diff] [blame] | 555 | |
| 556 | 1.1 (December 7, 2015) |
| 557 | -------------------------- |
| 558 | |
| 559 | * Documentation improvements (GIL, wrapping functions, casting, fixed many typos) |
| 560 | * Generalized conversion of integer types |
| 561 | * Improved support for casting function objects |
| 562 | * Improved support for ``std::shared_ptr<>`` conversions |
| 563 | * Initial support for ``std::set<>`` conversions |
| 564 | * Fixed type resolution issue for types defined in a separate plugin module |
| 565 | * Cmake build system improvements |
| 566 | * Factored out generic functionality to non-templated code (smaller code size) |
| 567 | * Added a code size / compile time benchmark vs Boost.Python |
| 568 | * Added an appveyor CI script |
| 569 | |
| 570 | 1.0 (October 15, 2015) |
| 571 | ------------------------ |
| 572 | * Initial release |