Pybind11 2.5.0

pybind11 is a lightweight header-only library that exposes C++ types in Python and vice versa, mainly to create Python bindings of existing C++ code. Its goals and syntax are similar to the excellent Boost.Python library by David Abrahams: to minimize boilerplate code in traditional extension modules by inferring type information using compile-time introspection.

Tags c++ python library embedded developers
License Public Domain
State stable

Recent Releases

2.5.001 Apr 2020 22:25 minor feature: begin working on next version . build with -Wmissing-prototypes. . misleading comment corrected (strides in buffer_info is bytes and not . . Obey __cpp_sized_deallocation and __cpp_aligned_new. . make builds with python tests and cpp tests fail if either one fails (# . . Report type names in return value policy-related cast exceptions. . test pair-copyability on C++17 upwards. . CMake: Add Python 3.8 to pybind11Tools. . Prevent cmake error when preempty. . ing minor typo in basics.rst. . ing SystemError when nb_bool/nb_nonzero sets a Python exception in . . Add exception translation for std::overflow_error.. . Aligned allocation for clang-cl. . support for readonly buffers. . Add FAQ entry for dealing with long functions interruption. . Minor modifications to interrupt handling FAQ. . numpy.h: minor preprocessor suggested by @chaekwan. . Revert "numpy.h: minor preprocessor suggested by @chaekwan". . Install headers using both headers and package_data. . Pin breathe to 4.13.1. . Use newer macOS image for python3 testing. . a memory leak when creating Python3 modules.. . Revert "a memory leak when creating Python3 modules. ". . Free tstate on python 3.7+ on finalize_interpreter. . undo #define copysign in pyconfig.h. . : Handle deinterpreter. . Add C++20 char8_t/u8string support. . Use C++17 fold expressions when casting tuples and argument lists (#2043. . Travis CI (MacOS, Py3). . bindings for import_error exception. . Handle cases where binding code immediately throws py::error_already_set. . Declare call_impl() as . . compilation with MinGW only. . stl_bind: add binding for std::vector::clear. . the use of MSVC in an MSYS environment. . pybind11Tools.cmake: search for Python 3.9. . v2.5.0 release.
2.4.315 Oct 2019 15:45 minor feature: Updated release.rst to remove parts that are now automated . Begin working on next version. . Version mismatch typos in.travis.yml. . Adapt to python3.8 C API change. . v2.4.3 release.
2.4.225 Sep 2019 06:45 minor feature: Begin working on next version . Future-proof Python version check from commit 31680e6. . Remove usage of C++14 constructs. . v2.4.2 release.
2.4.020 Sep 2019 19:25 minor feature: begin work on v2.3.1 . README.md: added several folks who've made repeated contributions. . casting of time points with non-system-clock duration with VS (#1748. . (warning about redefined macros). . Add docs and tests for unary op on class. . error_already_set: acquire GIL one line earlier. . test suite (pytest changes in ExceptionInfo class). . Replace a usage of C++14 language features with C++11 code. . Dtype field ordering for NumPy 1.14. . quiet clang warning by adding default move ctor. . Make sure `detail::get_internals` acquires the GIL before making Pyth . . renamed local gil_scoped_acquire to gil_scoped_acquire_local to avoid . . Allow Windows.h min/max to coexist with pybind11. . Add support for __await__, __aiter__, and __anext__ protocols. . Added ability to convert from datetime.date to system_clock::time_poi . . numpy: Add test for explicit dtype checks. At present, int64 + uint64 . . numpy: Provide concrete size aliases. . numpy: refcount leak to dtype singleton. . add mingw compatibility. . In internals.h, only look at _DEwhen compiling with MSVC.. . Avoid use of lambda to work around a clang.. . Add negative indexing support to stl_bind.. . -Wmissing-prototypes warning on Clang.. . Added set::contains and generalized dict::contains. . Added.empty() to all collection types. . Detect whether we are running in a Conda environment and adjust get_i . . Expose BufferError among other pybind11 exceptions.. . Make `overload_cast_impl` available in C++11 mode.. . Added support for list insertion.. . Don't strip desymbols in RelWithDebInfo mode. . Add const to buffer:request(). . restores __invert__ to arithmetic-enabled enum. Avoid conversion to `int_` rhs argument of enum eq/ne. . pybind11 internals: separate different compilers. . Avoid infinite recursion in is_copy_constructible. . v2.4.0 release.
2.3.004 Jul 2019 14:25 minor feature: updated changelog for v2.2.1 release . Make it possible to generate constexpr signatures in C++11 mode. . Use semi-constexpr signatures on MSVC. . Simplify function signature annotation and parsing. . dtype string leak. . Remove superfluous "requires_numpy". . correct stride in matrix example and test. . Specify minimum needed cmake version in test suite. . some minor mistakes in comments on struct instance. . Upgrading to Xcode 9 OSX/Py3 build failure. . `char ` arguments being non-bindable. . Add informative compilation failure for method_adaptor failures. . D Nx1/1xN inputs to eigen dense vector args. . Build /permissive- under VS2017. . Miscellaneous travis-ci updates/. Qualify `cast_op_type` to help ICC. . new flake8 E741 error from using `l` variable. . Trivial typos. . __qualname__ and nested class naming. . Added write only property functions for. support docstrings in enum::value(). . added citation reference. . Moved section on licensing of contributions. . Add -Wdeprecated to test suite and associated warnings. . Clean up eigen download code (and bump to 3.3.4). . Document using atexit for module destructors on PyPy. . Matching Python 2 int behavior on Python 2. . Remove spurious quote in error message.. . Silence new MSVC C++17 deprecation warnings. . Update PyPI URLs. . premature destruction of args/kwargs arguments. . leak in var arg handling. . Simplify arg copying. . Added py::args ref counting tests. . Make register_dtype() accept any field containers. . Add spaces around "=" in signature repr. . for numpy 1.14.0 compatibility. . Use a named rather than anon struct in instance. . misc. typos. . return from std::map bindings to __delitem__. . segfault when reloading interpreter with external modules. . Use stricter brace initialization. . Remove unnecessary `detail::`. . MSVC workaround for broken `using detail::_` warning. . pybind11 interoperability with Clang trunk. . added v2.2.2 changelog. . numpy
2.2.405 Feb 2019 12:09 minor bugfix: Use new Python 3.7 Thread Specific Storage (TSS) implementation if available. #1454, #1517. Fixes for newer MSVC versions and C++17 mode. #1347, #1462. Propagate return value policies to type-specific casters when casting STL containers. #1455. Allow ostream-redirection of more than 1024 characters. #1479. Set Py_DEBUG define when compiling against a debug Python build. #1438. Untangle integer logic in number type caster to work for custom types that may only be castable to a restricted set of builtin types. #1442. CMake build system: Remember Python version in cache file. #1434. Fix for custom smart pointers: use std::addressof to obtain holder address instead of operator . #1435. Properly report exceptions thrown during module initialization. #1362. Fixed a segmentation fault when creating empty-shaped NumPy array. #1371. The version of Intel C++ compiler must be = 2017, and this is now checked by the header files. #1363. A few minor typo fixes and improvements to the test suite, and patches that silence compiler warnings.