335968c1a6
- update to 2.12.0: * pybind11 now supports compiling for NumPy 2. However, if you experience issues you can define PYBIND11_NUMPY_1_ONLY to disable the new support for now, but this will be removed in the future. #5050 * pybind11/gil_safe_call_once.h was added (it needs to be included explicitly). The primary use case is GIL-safe initialization of C++ static variables. #4877 * Support move-only iterators in py::make_iterator, py::make_key_iterator, py::make_value_iterator. #4834 * Two simple py::set_error() functions were added and the documentation was updated accordingly. In particular, py::exception<>::operator() was deprecated (use one of the new functions instead). The documentation for py::exception<> was further updated to not suggest code that may result in undefined behavior. #4772 * Removes potential for Undefined Behavior during process teardown. #4897 * Improve compatibility with the nvcc compiler (especially CUDA 12.1/12.2). #4893 * pybind11/numpy.h now imports NumPy's multiarray and _internal submodules with paths depending on the installed version of NumPy (for compatibility with NumPy 2). #4857 * Builtins collections names in docstrings are now consistently rendered in lowercase (list, set, dict, tuple), in accordance with PEP 585. #4833 * Added py::typing::Iterator<T>, py::typing::Iterable<T>. #4832 * Render py::function as Callable in docstring. #4829 * Also bump PYBIND11_INTERNALS_VERSION for MSVC, which unlocks two new features without creating additional
Dirk Mueller2024-04-06 12:12:35 +00:00
0f19166a7b
Accepting request 1112607 from devel:languages:python
Ana Guerrero2023-09-22 19:47:17 +00:00
4ab6bac77f
Accepting request 1109302 from home:jengelh:branches:devel:languages:python
Ondřej Súkup2023-09-20 16:06:20 +00:00
a57a9b187e
- update to 2.10.4: * `python3 -m pybind11 gained a --version option (prints the version and exits). * Fix a warning when pydebug is enabled on Python 3.11. * Ensure gil_scoped_release` RAII is non-copyable. * Ensure the tests dir does not show up with new versions of setuptools. * Better stacklevel for a warning in setuptools helpers.
Dirk Mueller2023-03-19 12:08:37 +00:00
f9b128f4ea
Accepting request 1058070 from home:bnavigator:branches:devel:languages:python
Markéta Machová2023-01-13 12:02:24 +00:00
b3df88bd5f
- update to 2.10.3: * Temporarily made our GIL status assertions (added in 2.10.2) disabled by default (re-enable manually by defining `PYBIND11_ASSERT_GIL_HELD_INCREF_DECREF, will be enabled in 2.11). * Improved error messages when inc_ref/dec_ref are called with an invalid GIL state. * Some minor touchups found by static analyzers. * scoped_interpreter constructor taking PyConfig. * pybind11/eigen/tensor.h adds converters to and from Eigen::Tensor and Eigen::TensorMap. * PyGILState_Check()'s were integrated to pybind11::handleinc_ref() & dec_ref(). The added GIL checks are guarded by PYBIND11_ASSERT_GIL_HELD_INCREF_DECREF, which is the default only if NDEBUG is not defined. (Made non-default in 2.10.3, will be active in 2.11) * Add option for enable/disable enum members in docstring. * Fixed typing of KeysView, ValuesView and ItemsView in bind_map. * Fix segfault bug when passing foreign native functions to functional.h. * Build system improvements: * Support setting PYTHON_LIBRARIES manually for Windows ARM cross- compilation (classic mode). * Extend IPO/LTO detection for ICX (a.k.a IntelLLVM) compiler. * Allow calling find_package(pybind11 CONFIG) multiple times from separate directories in the same CMake project and properly link Python (new mode). * multiprocessing_set_spawn` in pytest fixture for added safety. * Fixed a bug in two pybind11/tools cmake scripts causing "Unknown arguments specified" errors.
Dirk Mueller2023-01-04 19:52:08 +00:00
eb2b8e431a
- update to 2.9.2: * Enum now has an `__index__ method on Python <3.8 too. * Local internals are now cleared after finalizing the interpreter. * Better support for Python 3.11 alphas. * PYBIND11_TYPE_CASTER now uses fully qualified symbols, so it can be used outside of pybind11::detail. * Some fixes for PyPy 3.9. * Fixed a potential memleak in PyPy in get_type_override. * Fix usage of VISIBILITY_INLINES_HIDDEN. * Uses sysconfig module to determine installation locations on Python >= 3.10, instead of distutils which has been deprecated. * Support Catch 2.13.5+ (supporting GLIBC 2.34+). * Fix test failures with numpy 1.22 by ignoring whitespace when comparing str()` of dtypes.
Dirk Mueller2022-04-09 22:56:31 +00:00
66b644bc43
- update to 2.9.1: * If possible, attach Python exception with py::raise_from to TypeError when casting from C++ to Python. This will give additional info if Python exceptions occur in the caster. * Add a mapping of C++11 nested exceptions to their Python exception equivalent using py::raise_from. This attaches the nested exceptions in Python using the __cause__ field. * Propagate Python exception traceback using raise_from if a pybind11 function runs out of overloads. * py::multiple_inheritance is now only needed when C++ bases are hidden from pybind11. * Allow py::args to be followed by other arguments; the remaining arguments are implicitly keyword-only, as if a py::kw_only{} annotation had been used. * Fix a rare warning about extra copy in an Eigen constructor. * Fix caching of the C++ overrides. * Add missing std::forward calls to some cpp_function overloads. * Support PyPy 7.3.7 and the PyPy3.8 beta. Test python-3.11 on PRs with the python dev label. * Replace usage of deprecated Eigen::MappedSparseMatrix with Eigen::Map<Eigen::SparseMatrix<...>> for Eigen 3.3+. * Tweaks to support Microsoft Visual Studio 2022.
Dirk Mueller2022-03-27 15:26:42 +00:00
ddab870f37
- udpate to 2.8.1: * The simple namespace creation shortcut added in 2.8.0 was deprecated due to usage of CPython internal API, and will be removed soon. * Add C++ Exception type to throw and catch `AttributeError. * Fixed the potential for dangling references when using properties with std::optional types. * Modernize usage of PyCodeObject on Python 3.9+ (moving toward support for Python 3.11a1) * A long-standing bug in eigen.h was fixed (originally PR #3343). The bug was unmasked by newly added static_assert's in the Eigen 3.4.0 release. * Support multiple raw inclusion of CMake helper files * Fix harmless warning on upcoming CMake 3.22. * Fix 2.8.0 regression with MSVC 2017 + C++17 mode + Python 3. * Fix 2.8.0 regression that caused undefined behavior (typically segfaults) in make_key_iterator/make_value_iterator` if dereferencing the iterator returned a temporary value instead of a reference.
Dirk Mueller2021-12-06 10:47:37 +00:00