changelog.rst 9.64 KB
Newer Older
1
2
3
4
5
.. _changelog:

Changelog
#########

Wenzel Jakob's avatar
Wenzel Jakob committed
6
7
8
9
Starting with version 1.8, pybind11 releases use a
[semantic versioning](http://semver.org) policy.

Breaking changes queued for v2.0.0 (Not yet released)
10
-----------------------------------------------------
Wenzel Jakob's avatar
Wenzel Jakob committed
11
12
13
14
15
* Redesigned virtual call mechanism and user-facing syntax (see
  https://github.com/pybind/pybind11/commit/86d825f3302701d81414ddd3d38bcd09433076bc)

* Remove ``handle.call()`` method

Wenzel Jakob's avatar
Wenzel Jakob committed
16
1.9.0 (Not yet released)
17
------------------------
Wenzel Jakob's avatar
Wenzel Jakob committed
18
19
* Queued changes: map indexing suite, documentation for indexing suites.
* Mapping a stateless C++ function to Python and back is now "for free" (i.e. no call overheads)
Wenzel Jakob's avatar
Wenzel Jakob committed
20
* Support for translation of arbitrary C++ exceptions to Python counterparts
Wenzel Jakob's avatar
Wenzel Jakob committed
21
22
23
* Added ``eval`` and ``eval_file`` functions for evaluating expressions and
  statements from a string or file
* eigen.h type converter fixed for non-contiguous arrays (e.g. slices)
24
* Print more informative error messages when ``make_tuple()`` or ``cast()`` fail
Wenzel Jakob's avatar
Wenzel Jakob committed
25
* ``std::enable_shared_from_this<>`` now also works for ``const`` values
26
27
28
* A return value policy can now be passed to ``handle::operator()``
* ``make_iterator()`` improvements for better compatibility with various types
  (now uses prefix increment operator)
Wenzel Jakob's avatar
Wenzel Jakob committed
29
* ``arg()`` now accepts a wider range of argument types for default values
30
31
32
33
* Various minor improvements of library internals (no user-visible changes)

1.8.1 (July 12, 2016)
----------------------
34
35
* Fixed a rare but potentially very severe issue when the garbage collector ran
  during pybind11 type creation.
Wenzel Jakob's avatar
Wenzel Jakob committed
36

Wenzel Jakob's avatar
Wenzel Jakob committed
37
1.8.0 (June 14, 2016)
Wenzel Jakob's avatar
Wenzel Jakob committed
38
39
40
41
42
43
44
45
----------------------
* Redesigned CMake build system which exports a convenient
  ``pybind11_add_module`` function to parent projects.
* ``std::vector<>`` type bindings analogous to Boost.Python's ``indexing_suite``
* Transparent conversion of sparse and dense Eigen matrices and vectors (``eigen.h``)
* Added an ``ExtraFlags`` template argument to the NumPy ``array_t<>`` wrapper
  to disable an enforced cast that may lose precision, e.g. to create overloads
  for different precisions and complex vs real-valued matrices.
46
47
* Prevent implicit conversion of floating point values to integral types in
  function arguments
Wenzel Jakob's avatar
Wenzel Jakob committed
48
49
* Fixed incorrect default return value policy for functions returning a shared
  pointer
50
* Don't allow registering a type via ``class_`` twice
Wenzel Jakob's avatar
Wenzel Jakob committed
51
52
53
54
* Don't allow casting a ``None`` value into a C++ lvalue reference
* Fixed a crash in ``enum_::operator==`` that was triggered by the ``help()`` command
* Improved detection of whether or not custom C++ types can be copy/move-constructed
* Extended ``str`` type to also work with ``bytes`` instances
Wenzel Jakob's avatar
Wenzel Jakob committed
55
56
57
* Added a ``"name"_a`` user defined string literal that is equivalent to ``py::arg("name")``.
* When specifying function arguments via ``py::arg``, the test that verifies
  the number of arguments now runs at compile time.
Wenzel Jakob's avatar
Wenzel Jakob committed
58
59
* Added ``[[noreturn]]`` attribute to ``pybind11_fail()`` to quench some
  compiler warnings
60
61
* List function arguments in exception text when the dispatch code cannot find
  a matching overload
Wenzel Jakob's avatar
Wenzel Jakob committed
62
* Added ``PYBIND11_OVERLOAD_NAME`` and ``PYBIND11_OVERLOAD_PURE_NAME`` macros which
Wenzel Jakob's avatar
Wenzel Jakob committed
63
  can be used to override virtual methods whose name differs in C++ and Python
Wenzel Jakob's avatar
Wenzel Jakob committed
64
  (e.g. ``__call__`` and ``operator()``)
Wenzel Jakob's avatar
Wenzel Jakob committed
65
* Various minor ``iterator`` and ``make_iterator()`` improvements
66
67
* Transparently support ``__bool__`` on Python 2.x and Python 3.x
* Fixed issue with destructor of unpickled object not being called
Wenzel Jakob's avatar
Wenzel Jakob committed
68
* Minor CMake build system improvements on Windows
69
70
71
* New ``pybind11::args`` and ``pybind11::kwargs`` types to create functions which
  take an arbitrary number of arguments and keyword arguments
* New syntax to call a Python function from C++ using ``*args`` and ``*kwargs``
Wenzel Jakob's avatar
Wenzel Jakob committed
72
73
74
75
76
77
* The functions ``def_property_*`` now correctly process docstring arguments (these
  formerly caused a segmentation fault)
* Many ``mkdoc.py`` improvements (enumerations, template arguments, ``DOC()``
  macro accepts more arguments)
* Cygwin support
* Documentation improvements (pickling support, ``keep_alive``, macro usage)
Wenzel Jakob's avatar
Wenzel Jakob committed
78

Wenzel Jakob's avatar
Wenzel Jakob committed
79
1.7 (April 30, 2016)
80
----------------------
Wenzel Jakob's avatar
Wenzel Jakob committed
81
* Added a new ``move`` return value policy that triggers C++11 move semantics.
Wenzel Jakob's avatar
Wenzel Jakob committed
82
  The automatic return value policy falls back to this case whenever a rvalue
Wenzel Jakob's avatar
Wenzel Jakob committed
83
  reference is encountered
Wenzel Jakob's avatar
Wenzel Jakob committed
84
85
* Significantly more general GIL state routines that are used instead of
  Python's troublesome ``PyGILState_Ensure`` and ``PyGILState_Release`` API
Wenzel Jakob's avatar
Wenzel Jakob committed
86
* Redesign of opaque types that drastically simplifies their usage
Wenzel Jakob's avatar
Wenzel Jakob committed
87
* Extended ability to pass values of type ``[const] void *``
Wenzel Jakob's avatar
Wenzel Jakob committed
88
* ``keep_alive`` fix: don't fail when there is no patient
Wenzel Jakob's avatar
Wenzel Jakob committed
89
* ``functional.h``: acquire the GIL before calling a Python function
Wenzel Jakob's avatar
Wenzel Jakob committed
90
91
92
* Added Python RAII type wrappers ``none`` and ``iterable``
* Added ``*args`` and ``*kwargs`` pass-through parameters to
  ``pybind11.get_include()`` function
Wenzel Jakob's avatar
Wenzel Jakob committed
93
94
* Iterator improvements and fixes
* Documentation on return value policies and opaque types improved
95

Wenzel Jakob's avatar
Wenzel Jakob committed
96
97
98
99
100
1.6 (April 30, 2016)
----------------------
* Skipped due to upload to PyPI gone wrong and inability to recover
  (https://github.com/pypa/packaging-problems/issues/74)

101
1.5 (April 21, 2016)
Wenzel Jakob's avatar
Wenzel Jakob committed
102
----------------------
Wenzel Jakob's avatar
Wenzel Jakob committed
103
* For polymorphic types, use RTTI to try to return the closest type registered with pybind11
104
* Pickling support for serializing and unserializing C++ instances to a byte stream in Python
105
106
107
* Added a convenience routine ``make_iterator()`` which turns a range indicated
  by a pair of C++ iterators into a iterable Python object
* Added ``len()`` and a variadic ``make_tuple()`` function
108
109
110
* Addressed a rare issue that could confuse the current virtual function
  dispatcher and another that could lead to crashes in multi-threaded
  applications
111
112
* Added a ``get_include()`` function to the Python module that returns the path
  of the directory containing the installed pybind11 header files
Wenzel Jakob's avatar
Wenzel Jakob committed
113
* Documentation improvements: import issues, symbol visibility, pickling, limitations
114
* Added casting support for ``std::reference_wrapper<>``
Wenzel Jakob's avatar
Wenzel Jakob committed
115

Wenzel Jakob's avatar
Wenzel Jakob committed
116
1.4 (April 7, 2016)
Wenzel Jakob's avatar
Wenzel Jakob committed
117
--------------------------
118
* Transparent type conversion for ``std::wstring`` and ``wchar_t``
Wenzel Jakob's avatar
Wenzel Jakob committed
119
* Allow passing ``nullptr``-valued strings
Wenzel Jakob's avatar
Wenzel Jakob committed
120
* Transparent passing of ``void *`` pointers using capsules
Wenzel Jakob's avatar
Wenzel Jakob committed
121
* Transparent support for returning values wrapped in ``std::unique_ptr<>``
122
* Improved docstring generation for compatibility with Sphinx
Wenzel Jakob's avatar
Wenzel Jakob committed
123
124
125
* Nicer debug error message when default parameter construction fails
* Support for "opaque" types that bypass the transparent conversion layer for STL containers
* Redesigned type casting interface to avoid ambiguities that could occasionally cause compiler errors
Wenzel Jakob's avatar
Wenzel Jakob committed
126
* Redesigned property implementation; fixes crashes due to an unfortunate default return value policy
127
* Anaconda package generation support
Wenzel Jakob's avatar
Wenzel Jakob committed
128
129

1.3 (March 8, 2016)
Wenzel Jakob's avatar
Wenzel Jakob committed
130
--------------------------
Wenzel Jakob's avatar
Wenzel Jakob committed
131
132
133

* Added support for the Intel C++ compiler (v15+)
* Added support for the STL unordered set/map data structures
Wenzel Jakob's avatar
Wenzel Jakob committed
134
* Added support for the STL linked list data structure
Wenzel Jakob's avatar
Wenzel Jakob committed
135
* NumPy-style broadcasting support in ``pybind11::vectorize``
Wenzel Jakob's avatar
Wenzel Jakob committed
136
* pybind11 now displays more verbose error messages when ``arg::operator=()`` fails
Wenzel Jakob's avatar
Wenzel Jakob committed
137
138
* pybind11 internal data structures now live in a version-dependent namespace to avoid ABI issues
* Many, many bugfixes involving corner cases and advanced usage
Wenzel Jakob's avatar
Wenzel Jakob committed
139
140

1.2 (February 7, 2016)
141
--------------------------
Wenzel Jakob's avatar
Wenzel Jakob committed
142

143
* Optional: efficient generation of function signatures at compile time using C++14
Wenzel Jakob's avatar
Wenzel Jakob committed
144
145
146
* Switched to a simpler and more general way of dealing with function default
  arguments. Unused keyword arguments in function calls are now detected and
  cause errors as expected
147
* New ``keep_alive`` call policy analogous to Boost.Python's ``with_custodian_and_ward``
Wenzel Jakob's avatar
Wenzel Jakob committed
148
* New ``pybind11::base<>`` attribute to indicate a subclass relationship
149
150
151
* Improved interface for RAII type wrappers in ``pytypes.h``
* Use RAII type wrappers consistently within pybind11 itself. This
  fixes various potential refcount leaks when exceptions occur
Wenzel Jakob's avatar
Wenzel Jakob committed
152
* Added new ``bytes`` RAII type wrapper (maps to ``string`` in Python 2.7)
Wenzel Jakob's avatar
Wenzel Jakob committed
153
154
* Made handle and related RAII classes const correct, using them more
  consistently everywhere now
155
156
157
158
159
160
161
* Got rid of the ugly ``__pybind11__`` attributes on the Python side---they are
  now stored in a C++ hash table that is not visible in Python
* Fixed refcount leaks involving NumPy arrays and bound functions
* Vastly improved handling of shared/smart pointers
* Removed an unnecessary copy operation in ``pybind11::vectorize``
* Fixed naming clashes when both pybind11 and NumPy headers are included
* Added conversions for additional exception types
Wenzel Jakob's avatar
Wenzel Jakob committed
162
163
* Documentation improvements (using multiple extension modules, smart pointers,
  other minor clarifications)
164
* unified infrastructure for parsing variadic arguments in ``class_`` and cpp_function
165
166
* Fixed license text (was: ZLIB, should have been: 3-clause BSD)
* Python 3.2 compatibility
Wenzel Jakob's avatar
Wenzel Jakob committed
167
168
169
170
* Fixed remaining issues when accessing types in another plugin module
* Added enum comparison and casting methods
* Improved SFINAE-based detection of whether types are copy-constructible
* Eliminated many warnings about unused variables and the use of ``offsetof()``
Wenzel Jakob's avatar
Wenzel Jakob committed
171
* Support for ``std::array<>`` conversions
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189

1.1 (December 7, 2015)
--------------------------

* Documentation improvements (GIL, wrapping functions, casting, fixed many typos)
* Generalized conversion of integer types
* Improved support for casting function objects
* Improved support for ``std::shared_ptr<>`` conversions
* Initial support for ``std::set<>`` conversions
* Fixed type resolution issue for types defined in a separate plugin module
* Cmake build system improvements
* Factored out generic functionality to non-templated code (smaller code size)
* Added a code size / compile time benchmark vs Boost.Python
* Added an appveyor CI script

1.0 (October 15, 2015)
------------------------
* Initial release