chore(deps): update dependency pybind/pybind11 to v3.1.0 - #22
Open
renovate[bot] wants to merge 1 commit into
Open
renovate[bot] wants to merge 1 commit into
renovate[bot] wants to merge 1 commit into
Conversation
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
This PR contains the following updates:
3.0.1→3.1.0Release Notes
pybind/pybind11 (pybind/pybind11)
v3.1.0: Version 3.1.0Compare Source
New Features:
Support for Python 3.8 was removed. The minimum supported version is now Python 3.9. #6110
Support for MSVC 2017 has been dropped. #6110
Changed strict-mode numeric conversions for PEP 484 compatibility:
floatnow acceptsint, andcomplexnow acceptsintandfloat. #5879Small extra features added to the pybind11 command line tool based on python-config. #4272
Added
subinterpreter_thread_state, an RAII wrapper that owns a reusablePyThreadStatefor a sub-interpreter, together with asubinterpreter_scoped_activateoverload that activates it. This lets an OS thread re-enter one or more sub-interpreters without creating and destroying aPyThreadStateon every activation. #6073Add
py::mod_gil_used()as replacement spelling topy::mod_gil_not_used(false). #5797Bug fixes:
Fixed a crash in
py::subinterpreter::create()when called without a currentPyThreadState, which its documentation explicitly allows — for example from an embedder that ended initialization withPyEval_SaveThread(), or from a worker thread that has never touched Python.error_scopeis now constructed after a thread state has been attached instead of before. #6127Make
py::printdelegate to the current frame/interpreter built-insprintentry, fixing handling ofsys.stdout = None, following the active runtime's stream, keyword, and error semantics, and remaining a no-op if the entry is unavailable during teardown. #6121Include the builtin
complextype in the input annotation of thestd::complex<T>type caster. #6113String views (e.g.
std::string_view) are now kept alive only when loaded from a transient source (such as a generator), fixing both a use-after-free and a regression where casting a view from a durable object outside a bound function would throw. #6096Drop Python 2 prepend to evaluated source, causing errors to be off by one. #6089
Fix data race on
last_storage_ptr_cache ingil_safe_call_once_and_store. #6087Allow user defined
__str__onenum_. #6078Fix generated
Callabletype annotations for Python callbacks passed into C++ by inverting the callback's argument/return I/O context relative to the enclosing function signature. #6055Correct
__delitem__for negative-step slices and re-enable contiguous erase fast path. #6088Do not pass
-fno-fat-lto-objectsto GCC on macOS, which made all LTO probes fail and silently disabled LTO. #6114Fixed cross-compilation to Emscripten/Pyodide with CMake ≥ 4.1 by no longer overriding an explicitly set
PYBIND11_USE_CROSSCOMPILINGwhenCMAKE_CROSSCOMPILING_EMULATORis defined. #6094Unset stale
PYTHON_MODULE_DEBUG_POSTFIXand correctUSE_PYTHON_INCLUDE_DIRvariable. #6086Apply
-undefined dynamic_lookupto all Apple platforms. #6075Internal:
Improved
py::enum_operator performance by restoring type-specific implementations. #5887Optimized internal
std::unordered_map/std::unordered_sethashing paths withnoexcept. #5960CI:
Test Python 3.15 in CI. #6107
Updated the CIBW test workflow to cibuildwheel v4.1 and bumped the Pyodide build to 314. #6095
v3.0.4: Version 3.0.4Compare Source
Bug fixes:
Fixed test builds with installed Eigen 5 by improving
Eigen3CMake package detection.#6036
Fixed move semantics of
scoped_ostream_redirectto preserve buffered output and avoid crashes when moved redirects restore stream buffers.#6033
Fixed
py::dynamic_attr()traversal on Python 3.13+ to correctly propagatePyObject_VisitManagedDict()results.#6032
Fixed
std::shared_ptr<T>fallback casting to avoid unnecessary copy-constructor instantiation inreference_internalpaths.#6028
CI:
Updated
setup-uvto the maintained GitHub Action tag scheme.#6035
Updated pre-commit hooks.
#6029
Updated GitHub Actions dependencies, including
actions-setup-cmakeandcibuildwheel.#6027
v3.0.3: Version 3.0.3Compare Source
Bug fixes:
Fixed TSS key exhaustion in
implicitly_convertible()when many implicit conversions are registered across large module sets.#6020
Fixed heap-buffer-overflow in
pythonbufwith undersized buffers by enforcing a minimum buffer size.#6019
Fixed virtual-inheritance pointer offset crashes when dispatching inherited methods through virtual bases.
#6017
Fixed
free(): invalid pointercrashes during interpreter shutdown withpy::enum_<>by duplicating late-addeddef_property_staticargument strings.#6015
Fixed
function_recordheap-type deallocation to callPyObject_Free()and decref the type.#6010
Hardened
PYBIND11_MODULE_PYINITandget_internals()against module-initialization crashes.#6018
Fixed
static_pointer_castbuild failure with virtual inheritance inholder_caster_foreign_helpers.h.#6014
Fixed ambiguous
factorytemplate specialization that caused compilation failures with nvcc + GCC 14.#6011
Fixed crash in
def_readwritefor non-smart-holder properties of smart-holder classes.#6008
Fixed memory leak for
py::dynamic_attr()objects on Python 3.13+ by clearing managed__dict__contents during deallocation.#5999
Fixed binding of
noexceptand ref-qualified (&,&&) methods inherited from unregistered base classes.#5992
Internal:
Moved
tomlkitdependency to the dev dependency group.#5990
Switched to newer public CPython APIs (
PyType_GetFlagsand public vectorcall APIs where available).#6005
Tests:
#5986
CI:
#6001
v3.0.2: Version 3.0.2Compare Source
New Features:
py::arraythat return shape and strides asstd::spanwhen available.#5974
Bug fixes:
Added fallback locking for Python 3.13t where
PyCriticalSection_BeginMutexis unavailable.#5981
Fixed race condition in
py::make_key_iteratorwith free-threaded Python.#5971
MSVC 19.16 and earlier were blocked from using
std::launderdue to internal compiler errors.#5968
Internals destructors were updated to check the owning interpreter before clearing Python objects.
#5965
Internals shutdown handling was refined in two iterations before release: an initial finalization-time cleanup was followed by a safety adjustment to avoid late-shutdown
py::castsegfaults.#5958
#5972
Fixed ambiguous
str(handle)construction forobject-derived types likekwargsordictby templatizing the constructor with SFINAE.#5949
Fixed concurrency consistency for
internals_pp_managerunder multiple-interpreters.#5947
Fixed MSVC LNK2001 in C++20 builds when /GL (whole program optimization) is enabled.
#5939
Added per-interpreter storage for
gil_safe_call_once_and_storeto make it safe under multi-interpreters.#5933
A workaround for a GCC
-Warray-boundsfalse positive inargument_vectorwas added.#5908
Corrected a mistake where support for
__index__was added, but the type hints did not reflect acceptance ofSupportsIndexobjects. Also fixed a long-standing bug: the complex-caster did not accept__index__inconvertmode.#5891
Fixed
*args/**kwargsreturn types. Added type hinting topy::make_tuple.#5881
Fixed compiler error in
type_caster_genericwhen casting aTimplicitly convertible fromT*.#5873
Updated
py::native_enumbindings to unregister enum types on destruction, preventing a use-after-free when returning a destroyed enum instance.#5871
Fixed undefined behavior that occurred when importing pybind11 modules from non-main threads created by C API modules or embedded python interpreters.
#5870
Fixed dangling pointer in
internals::registered_types_cpp_fast.#5867
Added support for
std::shared_ptr<T>when loading module-local or conduit types from other modules.#5862
Fixed thread-safety issues if types were concurrently registered while
get_local_type_info()was called in free threaded Python.#5856
Fixed py::float_ casting and py::int_ and py::float_ type hints.
#5839
Fixed two
smart_holderbugs inshared_ptrandunique_ptradoption with multiple/virtual inheritance:shared_ptrto-Python caster was updated to register the correct subobject pointer (fixes #5786).unique_ptradoption was updated to own the proper object start while aliasing subobject pointers for registration, which fixed MSVC crashes during destruction.#5836
Constrained
accessor::operator=templates to avoid obscuring special members.#5832
Fixed crash that can occur when finalizers acquire and release the GIL.
#5828
Fixed compiler detection in
pybind11/detail/pybind11_namespace_macros.hfor clang-cl on Windows, to address warning suppression macros.#5816
Fixed compatibility with CMake policy CMP0190 by not always requiring a Python interpreter when cross-compiling.
#5829
Added a static assertion to disallow
keep_aliveandcall_guardon properties.#5533
Internal:
CMake policy limit was set to 4.1.
#5944
Improved performance of function calls between Python and C++ by switching to the "vectorcall" calling protocol.
#5948
Many C-style casts were replaced with C++-style casts.
#5930
Added
cast_sourcesabstraction totype_caster_generic.#5866
Improved the performance of from-Python conversions of legacy pybind11 enum objects bound by
py::enum_.#5860
Reduced size overhead by deduplicating functions' readable signatures and type information.
#5857
Used new Python 3.14 C APIs when available.
#5854
Improved performance of function dispatch and type casting by porting two-level type info lookup strategy from nanobind.
#5842
Updated
.gitignoreto exclude__pycache__/directories.#5838
Changed internals to use
thread_localinstead ofthread_specific_storagefor increased performance.#5834
Reduced function call overhead by using thread_local for loader_life_support when possible.
#5830
Removed heap allocation for the C++ argument array when dispatching functions with 6 or fewer arguments.
#5824
Documentation:
Fixed docstring for
long doublecomplex types to usenumpy.clongdoubleinstead of the deprecatednumpy.longcomplex(removed in NumPy 2.0).#5952
The "Supported compilers" and "Supported platforms" sections in the main
README.rstwere replaced with a new "Supported platforms & compilers" section that points to the CI test matrix as the living source of truth.#5910
Fixed documentation formatting.
#5903
Updated upgrade notes for
py::native_enum.#5885
Clarified in the docs to what extent bindings are global.
#5859
Tests:
Fixed deadlock in a free-threading test by releasing the GIL while waiting on synchronization.
#5973
Calls to
env.deprecated_call()were replaced with direct calls topytest.deprecated_call().#5893
Updated pytest configuration to use
log_levelinstead oflog_cli_level.#5890
CI:
Added CI tests for windows-11-arm with clang/MSVC (currently python 3.13), windows-11-arm with clang/mingw (currently python 3.12).
#5932
These clang-tidy rules were added:
readability-redundant-casting,readability-redundant-inline-specifier,readability-redundant-member-init#5924
Replaced deprecated macos-13 runners with macos-15-intel in CI.
#5916
Restored
runs-on: windows-latestin CI.#5835
Configuration
📅 Schedule: (UTC)
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻ Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.
This PR was generated by Mend Renovate. View the repository job log.