All Versions
30
Latest Version
Avg Release Cycle
142 days
Latest Release
60 days ago
Changelog History
Page 2
Changelog History
Page 2
-
v2.6.0 Changes
October 21, 2020๐ New features:
- ๐ Keyword-only arguments supported in Python 2 or 3 with
py::kw_only(). #2100 - ๐ Positional-only arguments supported in Python 2 or 3 with
py::pos_only(). #2459 py::is_final()class modifier to block subclassing (CPython only). #2151- โ Added
py::prepend(), allowing a function to be placed at the beginning of the overload chain. #1131 - Access to the type object now provided with
py::type::of<T>()andpy::type::of(h). #2364 - ๐ Perfect forwarding support for methods. #2048
- Added
py::error_already_set::discard_as_unraisable(). #2372 py::hashis now public. #2217py::class_<union_type>is now supported. Note that writing to one data member of the union and reading another (type punning) is UB in C++. Thus pybind11-bound enums should never be used for such conversions. #2320.- Classes now check local scope when registering members, allowing a subclass to have a member with the same name as a parent (such as an enum). #2335
Code correctness features:
- Error now thrown when
__init__is forgotten on subclasses. #2152 - Throw error if conversion to a pybind11 type if the Python object isn't a valid instance of that type, such as
py::bytes(o)whenpy::object oisn't a bytes instance. #2349 - Throw if conversion to
strfails. #2477
API changes:
py::modulewas renamedpy::module_to avoid issues with C++20 when used unqualified, but an aliaspy::moduleis provided for backward compatibility. #2489- ๐ Public constructors for
py::module_have been deprecated; please usepybind11::module_::create_extension_moduleif you were using the public constructor (fairly rare afterPYBIND11_MODULEwas introduced). #2552 PYBIND11_OVERLOAD*macros andget_overloadfunction replaced by correctly-namedPYBIND11_OVERRIDE*andget_override, fixing inconsistencies in the presence of a closing;in these macros.get_type_overloadis deprecated. #2325
๐ Packaging / building improvements:
- ๐ฆ The Python package was reworked to be more powerful and useful. #2433
build-setuptoolsis easier thanks to a newpybind11.setup_helpersmodule, which provides utilities to use setuptools with pybind11. It can be used via PEP 518,setup_requires, or by directly importing or copyingsetup_helpers.pyinto your project.- CMake configuration files are now included in the Python package. Use
pybind11.get_cmake_dir()orpython -m pybind11 --cmakedirto get the directory with the CMake configuration files, or include the site-packages location in yourCMAKE_MODULE_PATH. Or you can use the newpybind11[global]extra when you installpybind11, which installs the CMake files and headers into your base environment in the standard location. pybind11-configis another way to writepython -m pybind11if you have your PATH set up.- Added external typing support to the helper module, code from
import pybind11can now be type checked. #2588
- Minimum CMake required increased to 3.4. #2338 and #2370
- Full integration with CMake's C++ standard system and compile features replaces
PYBIND11_CPP_STANDARD. - Generated config file is now portable to different Python/compiler/CMake versions.
- Virtual environments prioritized if
PYTHON_EXECUTABLEis not set (venv,virtualenv, andconda) (similar to the new FindPython mode). - Other CMake features now natively supported, like
CMAKE_INTERPROCEDURAL_OPTIMIZATION,set(CMAKE_CXX_VISIBILITY_PRESET hidden). CUDAas a language is now supported.- Helper functions
pybind11_strip,pybind11_extension,pybind11_find_importadded, seecmake/index. - Optional
find-python-modeandnopython-modewith CMake. #2370
- Full integration with CMake's C++ standard system and compile features replaces
- Uninstall target added. #2265 and #2346
- โ
pybind11_add_module()now accepts an optionalOPT_SIZEflag that switches the binding target to size-based optimization if the global build type can not always be fixed toMinSizeRel(except in debug mode, where optimizations remain disabled).MinSizeRelor this flag reduces binary size quite substantially (~25% on some platforms). #2463
๐ Smaller or developer focused features and fixes:
- ๐ Moved
mkdoc.pyto a new repo, pybind11-mkdoc. There are no longer submodules in the main repo. - ๐
py::memoryviewsegfault fix and update, with newpy::memoryview::from_memoryin Python 3, and documentation. #2223 - ๐ Fix for
buffer_infoon Python 2. #2503 - If
__eq__defined but not__hash__,__hash__is now set toNone. #2291 py::ellipsisnow also works on Python 2. #2360- ๐ Pointer to
std::tuple&std::pairsupported in cast. #2334 - ๐ Small fixes in NumPy support.
py::arraynow usespy::ssize_tas first argument type. #2293 - โ Added missing signature for
py::array. #2363 unchecked_mutable_referencehas access to operator()and[]when const. #2514- ๐
py::vectorizeis now supported on functions that return void. #1969 py::capsulesupportsget_pointerandset_pointer. #1131- ๐ Fix crash when different instances share the same pointer of the same type. #2252
- ๐ Fix for
py::lennot clearing Python's error state when it fails and throws. #2575 - ๐ Bugfixes related to more extensive testing, new GitHub Actions CI. #2321
- ๐ Bug in timezone issue in Eastern hemisphere midnight fixed. #2438
std::chrono::time_pointnow works when the resolution is not the same as the system. #2481- ๐ Bug fixed where
py::array_tcould accept arrays that did not match the requested ordering. #2484 - ๐ Avoid a segfault on some compilers when types are removed in Python. #2564
py::arg::none()is now also respected when passing keyword arguments. #2611- ๐ PyPy fixes, PyPy 7.3.x now supported, including PyPy3. (Known issue with PyPy2 and Windows #2596). #2146
- ๐ CPython 3.9.0 workaround for undefined behavior (macOS segfault). #2576
- โ CPython 3.9 warning fixes. #2253
- ๐ Improved C++20 support, now tested in CI. #2489 #2599
- ๐ Improved but still incomplete debug Python interpreter support. #2025
- โ NVCC (CUDA 11) now supported and tested in CI. #2461
- โ NVIDIA PGI compilers now supported and tested in CI. #2475
- At least Intel 18 now explicitly required when compiling with Intel. #2577
- ๐ Extensive style checking in CI, with pre-commit support. Code modernization, checked by clang-tidy.
- ๐ Expanded docs, including new main page, new installing section, and CMake helpers page, along with over a dozen new sections on existing pages.
- ๐ In GitHub, new docs for contributing and new issue templates.
- ๐ Keyword-only arguments supported in Python 2 or 3 with
-
v2.6.0.rc3 Changes
October 16, 2020๐ Next release candidate.
- Factory constructor scope fix
- ๐ Support for PyPy3 on Windows 32, added to CI
- ๐ Fixes for C++20, added to CI for Clang, GCC, and MSVC 2019
- Black formatting for all Python code
- ๐ Allow ABI string overrides from 2.4 (advanced)
-
v2.6.0.rc2 Changes
October 14, 2020๐ Next release candidate. Changes since RC 1:
๐ Fixed:
- โช Python 3.9.0 bug workaround implemented
- ๐ Better support in CMake for packing and cross-compiling
- ๐ Fix for failing
py::lenleaving error state set - ๐ Intel 18+ explicitly required, an issue with Intel compilers fixed
- Custom ipo flags disabled with
RelWithDebInfo(useCMAKE_INTERPROCEDURAL_OPTIMIZATIONfor more control) - ๐ Possible duplicate linker flags fixed in
setup_helpers - ๐ Changes to
py::module_constructor are no longer provisional.
๐ New features:
- ๐ Static typing support for
import pybind11
-
v2.6.0.rc1 Changes
October 09, 2020๐ This is the first release candidate for pybind11 2.6.0. Please see the new features in the changelog, such as revamped CMake and setuptools support, keyword and positional argument support, and a long list of features, fixes, and improvements. Full Python 3.9 support and enhanced C++20 support.
Known issues:
- ๐
py::module_direct construction provisionally deprecated - โ Removing registered types can cause a segfault - old issue exposed by recent test additions; fix incoming
- ๐ On Python 3.9.0 and macOS, pybind11 may segfault when closing the interpreter after running the test suite
- ๐
-
v2.6.0.b1 Changes
September 30, 2020๐ v2.6.0 beta release.
-
v2.5.0
March 31, 2020 -
v2.4.3
October 14, 2019 -
v2.4.2
September 21, 2019 -
v2.4.1
September 20, 2019 -
v2.4.0
September 19, 2019