Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Created with
brew bump-formula-pr
.release notes
pybind11
now supports compiling for NumPy 2. Most code shouldn't change (seeupgrade-guide-2.12
for details). However, if you experience issues you can definePYBIND11_NUMPY_1_ONLY
to disable the new support for now, but this will be removed in the future. #5050pybind11/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. #4877py::make_iterator
,py::make_key_iterator
,py::make_value_iterator
. #4834py::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 forpy::exception<>
was further updated to not suggest code that may result in undefined behavior. #4772Bug fixes:
pybind11/numpy.h
now imports NumPy'smultiarray
and_internal
submodules with paths depending on the installed version of NumPy (for compatibility with NumPy 2). #4857py::typing::Iterator<T>
,py::typing::Iterable<T>
. #4832py::function
asCallable
in docstring. #4829PYBIND11_INTERNALS_VERSION
for MSVC, which unlocks two new features without creating additional incompatibilities. #4819bind_map
withusing
declarations. #4952py::detail::concat
usage to avoid ADL selecting one from somewhere else, such as modernjson's concat. #4955class_
forKeysView
/ValuesView
/ItemsView
. #4985PyObject_VisitManagedDict()
andPyObject_ClearManagedDict()
on Python 3.13 and newer. #4973make_static_property_type()
to make it compatible with Python 3.13. #4971make_iterator
,make_key_iterator
,make_value_iterator
. #4876py::buffer
,py::sequence
andpy::handle
(toBuffer
,Sequence
,Any
). #4831base_enum.__str__
docstring. #4827typing.h
to annotate tuple, dict, list, set, and function. #4259handle_type_name
specialization to type-hint variable length tuples. #5051PYBIND11_FINDPYTHON
to OFF will force the old FindPythonLibs mechanism to be used. #5042PYBIND11_PYTHON_EXECUTABLE_LAST
for the first cmake run. #4856pkg_resources
ifimportlib.metadata
available. #4941Python_ADDITIONAL_VERSIONS
(classic search) now includes 3.12. #4909pybind11.pc
is now relocatable by default as long as install destinations are not absolute paths. #4830PYBIND11_FINDPYTHON
(fixes manylinux builds). #4805pybind11_strip
is no longer automatically applied whenCMAKE_BUILD_TYPE
is unset. #4780DEBUG_POSFIX
correctly for debug builds. #4761Documentation:
functions.rst
. #4791CI:
Other:
assert()
was added to help Coverty avoid generating a false positive. #4817