pybind11 3.1.0 - #297539
Merged
Merged
Conversation
dtrodrigues
approved these changes
Aug 7, 2026
Contributor
|
🤖 An automated task has requested bottles to be published to this PR. Caution Please do not push to this PR branch before the bottle commits have been pushed, as this results in a state that is difficult to recover from. If you need to resolve a merge conflict, please use a merge commit. Do not force-push to this PR branch. |
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.
Created by
brew bumpCreated with
brew bump-formula-pr.Details
release notes
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
View the full release notes at https://github.com/pybind/pybind11/releases/tag/v3.1.0.