Change array_caster in pybind11/stl.h to support value types that are not default-constructible. - #30034
Conversation
…` triggered by stl.h `array_caster`:
```
clang++ -o pybind11/tests/test_stl_no_default_ctor.os -c -std=c++17 -fPIC -fvisibility=hidden -O0 -g -Wall -Wextra -Wconversion -Wcast-qual -Wdeprecated -Wundef -Wnon-virtual-dtor -Wunused-result -Werror -isystem /usr/include/python3.10 -isystem /usr/include/eigen3 -DPYBIND11_STRICT_ASSERTS_CLASS_HOLDER_VS_TYPE_CASTER_MIX -DPYBIND11_ENABLE_TYPE_CASTER_ODR_GUARD_IF_AVAILABLE -DPYBIND11_TEST_BOOST -Ipybind11/include -I/usr/local/google/home/rwgk/forked/pybind11/include -I/usr/local/google/home/rwgk/clone/pybind11/include /usr/local/google/home/rwgk/forked/pybind11/tests/test_stl_no_default_ctor.cpp
In file included from /usr/local/google/home/rwgk/forked/pybind11/tests/test_stl_no_default_ctor.cpp:1:
In file included from /usr/local/google/home/rwgk/forked/pybind11/include/pybind11/stl.h:12:
In file included from /usr/local/google/home/rwgk/forked/pybind11/include/pybind11/pybind11.h:13:
In file included from /usr/local/google/home/rwgk/forked/pybind11/include/pybind11/detail/class.h:12:
In file included from /usr/local/google/home/rwgk/forked/pybind11/include/pybind11/attr.h:14:
In file included from /usr/local/google/home/rwgk/forked/pybind11/include/pybind11/cast.h:18:
/usr/local/google/home/rwgk/forked/pybind11/include/pybind11/detail/type_caster_odr_guard.h:111:5: error: call to implicitly-deleted default constructor of 'pybind11::detail::type_caster<std::array<pybind11_tests::stl_no_default_ctor::Node, 2>>'
type_caster_odr_guard() {
^
/usr/bin/../lib/gcc/x86_64-linux-gnu/12/../../../../include/c++/12/tuple:190:9: note: in instantiation of member function 'pybind11::detail::type_caster_odr_guard<std::array<pybind11_tests::stl_no_default_ctor::Node, 2>, pybind11::detail::type_caster<std::array<pybind11_tests::stl_no_default_ctor::Node, 2>>>::type_caster_odr_guard' requested here
: _M_head_impl() { }
^
/usr/local/google/home/rwgk/forked/pybind11/include/pybind11/pybind11.h:104:9: note: in instantiation of function template specialization 'pybind11::cpp_function::initialize<(lambda at /usr/local/google/home/rwgk/forked/pybind11/include/pybind11/pybind11.h:1583:29), void, pybind11_tests::stl_no_default_ctor::NodeArray &, const std::array<pybind11_tests::stl_no_default_ctor::Node, 2> &, pybind11::is_method>' requested here
initialize(
^
/usr/local/google/home/rwgk/forked/pybind11/include/pybind11/pybind11.h:1583:16: note: in instantiation of function template specialization 'pybind11::cpp_function::cpp_function<(lambda at /usr/local/google/home/rwgk/forked/pybind11/include/pybind11/pybind11.h:1583:29), pybind11::is_method, void>' requested here
return cpp_function([pm](T &c, const D &value) { c.*pm = value; }, is_method(hdl));
^
/usr/local/google/home/rwgk/forked/pybind11/include/pybind11/pybind11.h:1926:54: note: in instantiation of function template specialization 'pybind11::property_cpp_function<pybind11_tests::stl_no_default_ctor::NodeArray, std::array<pybind11_tests::stl_no_default_ctor::Node, 2>>::write<std::array<pybind11_tests::stl_no_default_ctor::Node, 2> pybind11_tests::stl_no_default_ctor::NodeArray::*, 0>' requested here
property_cpp_function<type, D>::write(pm, *this),
^
/usr/local/google/home/rwgk/forked/pybind11/tests/test_stl_no_default_ctor.cpp:32:10: note: in instantiation of function template specialization 'pybind11::class_<pybind11_tests::stl_no_default_ctor::NodeArray>::def_readwrite<pybind11_tests::stl_no_default_ctor::NodeArray, std::array<pybind11_tests::stl_no_default_ctor::Node, 2>>' requested here
.def_readwrite("arr", &NodeArray::arr);
^
/usr/local/google/home/rwgk/forked/pybind11/include/pybind11/stl.h:288:7: note: default constructor of 'type_caster<std::array<pybind11_tests::stl_no_default_ctor::Node, 2>>' is implicitly deleted because base class 'array_caster<std::array<Node, 2UL>, pybind11_tests::stl_no_default_ctor::Node, false, 2UL>' has a deleted default constructor
: array_caster<std::array<Type, Size>, Type, false, Size> {};
^
/usr/local/google/home/rwgk/forked/pybind11/include/pybind11/stl.h:278:5: note: default constructor of 'array_caster<std::array<pybind11_tests::stl_no_default_ctor::Node, 2>, pybind11_tests::stl_no_default_ctor::Node, false, 2>' is implicitly deleted because field 'value' has a deleted default constructor
PYBIND11_TYPE_CASTER_RVPP(ArrayType,
^
/usr/local/google/home/rwgk/forked/pybind11/include/pybind11/cast.h:262:5: note: expanded from macro 'PYBIND11_TYPE_CASTER_RVPP'
PYBIND11_TYPE_CASTER_IMPL(type, py_name, ::pybind11::return_value_policy_pack)
^
/usr/local/google/home/rwgk/forked/pybind11/include/pybind11/cast.h:232:10: note: expanded from macro 'PYBIND11_TYPE_CASTER_IMPL'
type value; \
^
/usr/bin/../lib/gcc/x86_64-linux-gnu/12/../../../../include/c++/12/array:115:56: note: default constructor of 'array<pybind11_tests::stl_no_default_ctor::Node, 2>' is implicitly deleted because field '_M_elems' has no default constructor
typename _AT_Type::_Type _M_elems;
^
1 error generated.
```
…a default constructor.
…8.5 compilation errors.
error: call to implicitly-deleted default constructorarray_caster in pybind11/stl.h to support value types that are not default-constructible.
| // For the resize to work, `Value` must be default constructible. | ||
| // For `std::valarray`, this is a requirement: | ||
| // https://en.cppreference.com/w/cpp/named_req/NumericType | ||
| value->resize(l.size()); |
There was a problem hiding this comment.
Is there a way to use e.g. emplace to construct the elements in place? then you can likely avoid the default constructible requirement. (not sure if the comment above means the requirement is a limitation or always satisfied)
There was a problem hiding this comment.
Yes, but I added this to the PR description after seeing your questions:
This PR preserves the existing
array_casterbehavior as much as possible. The only difference is that it also works for value types that are not default-constructible. — Note that without this PR, the new test results in a compiler error.
I also added a source code comment here:
// Using `resize` to preserve the behavior exactly as it was before google/pywrapcc#30034
| } | ||
| if (policy == return_value_policy::take_ownership) { | ||
| auto h = cast(std::move(*src), policy, parent); | ||
| delete src; // WARNING: Assumes `src` was allocated with `new`. |
There was a problem hiding this comment.
Do you know typically from whom is src allocated? If so, might be helpful to mention that here for more context.
There was a problem hiding this comment.
Or is this a typical requirement for any take_ownership policy on casters with pointer type src?
There was a problem hiding this comment.
I also added a source code comment here:
// Intentionally preserving the behavior exactly as it was before google/pywrapcc#30034
Do you know typically from whom is src allocated?
No! :-)
I think this is one of the dark corners of pybind11, specifically the PYBIND11_TYPE_CASTER macro, which is used a lot. But the ecosystem has grown around it ... better don't touch.
|
|
||
| def test_array_no_default_ctor(): | ||
| lst = m.NoDefaultCtorArray(3) | ||
| assert [e.val for e in lst.arr] == [13, 23] |
There was a problem hiding this comment.
Do you allow mutation of members of the array? if so might want to add a test about whether mutating lst.arr affects m.NoDefaultCtorArray(4).arr.
There was a problem hiding this comment.
The array_caster copies (or moves) elements to/from a native Python list. The code below demonstrates the behavior. I verified that it works, then undid the change again, because that aspect of the array_caster behavior is tangential to adding the default ctor support.
def test_array_no_default_ctor():
lst = m.NoDefaultCtorArray(3)
assert [e.val for e in lst.arr] == [13, 23]
lst4 = m.NoDefaultCtorArray(4)
lst.arr = lst4.arr
assert [e.val for e in lst.arr] == [14, 24]
# Tangential to default ctor behavior:
lst.arr = m.NoDefaultCtorArray(5).arr
assert [e.val for e in lst.arr] == [15, 25]
assert [e.val for e in lst4.arr] == [14, 24]|
EDIT: This was resolved by pybind/pybind11#5006 The two 🐍 3 • windows-latest • mingw32 CI failures are unrelated and also appear on pybind11 master: https://github.com/pybind/pybind11/actions/runs/7514690075/job/20457837110 Last to work: First broken: |
|
Thanks for the review! |
For easy direct access: * google/pybind11clif#30034 * google/pybind11clif#30087 * google/pybind11clif#30088 Note regarding the change in std_containers_copy_move_test.py: When the test was added (cl/570839777), the undocumented expectation was that it is hyper-sensitive, but that it will be adjusted or made more permissive (similar to e.g. google3/third_party/clif/testing/python/return_value_policy_test.py;l=25;rcl=534200687) as needed. #MIGRATION_3P_PYBIND11__DEFAULT ``` - 24a3b1c3729401ca661efacfbbd13a83117e1bae Add `case return_value_policy::_clif_automatic` in type_c... by Ralf W. Grosse-Kunstleve <rwgk@google.com> - 015834b13a99d233c15406c36a3a44d27ebfc846 Change `array_caster` in pybind11/stl.h to support value ... by Ralf W. Grosse-Kunstleve <rwgk@google.com> - ce00785ef877f0bb1dba10115f00366111583b3c Add `release_gil_before_calling_cpp_dtor` annotation for ... by Ralf W. Grosse-Kunstleve <rwgk@google.com> ``` PiperOrigin-RevId: 599883612
f5fbe867 chore: bump to 3.0.1 (#5810)
cddec2bb fix: limit warning issue (#5807)
e71489c3 tests: avoid false DOWNLOAD_CATCH manually-specified variables warning (#5803)
8bbc3091 Improve buffer_info type checking in numpy docs (#5805)
03607757 correct homebrew package URL in installing.rst (#5808)
adb5603f chore: rename generic slots variable (#5793)
7aa3780d Replace robotpy-build with semiwrap (#5804)
ce712285 ci: avoid macOS 15 image change for iOS (#5798)
c1bf55a2 Fix subinterpreter exception handling SEGFAULT (#5795)
90bc05c7 chore(deps): bump actions/download-artifact (#5792)
580494c7 fix: LTO warning of gcc >= 11.4 (#5791)
6292b704 Explain linting suppressions (#5790)
94c82508 inline get_interpreter_state_uncheccked inline function (#5789)
23c59b6e ci: add android test (#5714)
a5665e3a fix: type_caster_enum_type for pointer types (#5694) (#5776)
9360553f chore(deps): update pre-commit hooks (#5785)
c5e8fec9 Make function record subinterpreter safe (#5771)
0db3d59f Allow multiphase modules to be re-imported (#5782)
780ec113 Make implicitly_convertable sub-interpreter and free-threading safe (#5777)
9af8adb7 Subinterpreter creation concurrency issues in 3.12 (#5779)
6972597c docs: show nogil in most examples (#5770)
33533ff3 Fix IsolatedConfig test (#5768)
7f5eea43 Check for __cpp_lib_remove_cvref as well (#5761)
49d19fef Implement binary version of make_index_sequence (#5751)
6aeae9c3 Fix py::trampoline_self_life_support visibility in docs (#5766)
316273ef fix: don't force -fvisibility=hidden on Windows (#5757)
c4ee83c4 fix:: initialize_generic compiler warning about nullptr dereference (#5756)
cc69a378 chore(deps): update pre-commit hooks (#5745)
66d394f2 docs: standardize header a bit (#5749)
fa72aff5 [skip ci] Small `docs/release.rst` update, mainly to remove `git push --tags`. (#5748)
422990f8 chore: get back to work (after v3.0.0 release) (#5747)
ed5057de chore: prepare for 3.0.0 (final) (#5746)
4dc4aca2 [skip ci] Explain: conduit feature only covers from-Python-to-C++ conversions (#5740)
03d8f487 docs: fix typo in multiple_interpreters (#5738)
ea3e33e4 chore: prepare for 3.0.0rc4 (#5736)
bdc56d9e chore(deps): bump urllib3 from 2.2.2 to 2.5.0 in /docs (#5735)
cf3d1a75 feat: numpy scalars (#5726)
c60c1499 tests: handle 3.12 and 3.13 implementations and 3.14.0b3+ (#5732)
be507b72 ci: check latest on 3.13 (#5734)
f2c0ab83 Fix TSan warning in sub-interpreter test (#5729)
ad9180c1 fix: android CMake support (#5733)
86e82ddb Add support for `shared_ptr<const T>` in `py::init()` with `smart_holder` (#5731)
365d41a4 Eliminate cross-DSO RTTI reliance in `smart_holder` functionality (for platforms like macOS). (#5728)
e2f86af2 docs: add documentation entry for warnings (#5356)
f3bb0073 better test for const only smart ptr (#5727)
d218b160 ci: avoid 3.13.4 on Windows (#5725)
f8640da4 chore(deps): bump pypa/cibuildwheel from 3.0.0rc2 to 3.0 in the actions group (#5721)
7ed76e2d fix: add support for const-only smart pointers (#5718)
513d1f96 ci: check iOS update (#5717)
ff0e381d chore(deps): bump requests from 2.32.3 to 2.32.4 in /docs (#5720)
6c5d25aa test: run pytest under Python devmode (#5715)
5d32ed76 docs: prepare for RC 3 (#5713)
c786d34f fix: handle null `py::handle` and add tests for `py::scoped_critical_section` (#5706)
c7026d0d fix!: modify the internals pointer-to-pointer implementation to not use `thread_local` (#5709)
b1948914 fix: expose required symbol using clang (#5700)
d4d2ec1a ci: avoid brownout (and removal) of windows-2019 (#5712)
0985052a chore(deps): update pre-commit hooks (#5711)
9295c4a5 fix: follow rest of pybind11 closer with PYBIND11_HAS_SUBINTERPRETER_SUPPORT (#5710)
7da1d53d ci: test on iOS (#5705)
c2b32b1e fix(types): type hints from future python versions (#5693)
21c9dd11 ci: drop main tests on main
e4873e8f fix: allow subinterp support to be disabled
33fb5333 fix: C++20 in Windows
bc557a9b tests: add PYBIND11_TEST_SMART_HOLDER to tests
29979761 ci: rename cibw workflow file
7e672ca1 tests: support C++23 in tests
ef2ad42d ci: list all jobs explicitly
5dff3354 ci: reduce runs on draft PRs
df595b16 docs: changelog update for 3.0.0rc2
a1b19722 chore: prepare for 3.0.0rc2 (#5698)
a18b1bc4 tests: always disable on the nogil build (#5701)
57e27c1f tests: skip some flaky gil tests on nogil (#5699)
1c10d5e9 fix: prepare for 3.14 beta 2 (#5697)
6e3e8515 fix(cmake): regression in include gaurd (#5691)
03b4a9e5 fix: don't destruct module objects in atexit (#5688)
1dd85ef4 chore: bump maximum clang tested to 20 (#5692)
9d066265 docs: more warnings about locking and the GIL (#5689)
d7769de5 feat: scoped_critical_section (#5684)
e3883dd5 refactor: use CPython macros to construct `PYBIND11_VERSION_HEX` (#5683)
e4622cbd chore(cmake): add compile commands to preset (#5685)
98bd78f0 chore: rename macro `PYBIND11_SUBINTERPRETER_SUPPORT` -> `PYBIND11_HAS_SUBINTERPRETER_SUPPORT` to meet naming convention (#5682)
8d503e30 docs: update contributing/release guide a little (#5681)
2624d4a3 tests: expect free-threaded import warnings (#5680)
fc888f75 docs: prepare for 3.0.0rc1 (#5679)
e8f16e2f docs: remove setup.py mentions, mention presets (#5677)
07d028f2 feat: Embeded sub-interpreters (#5666)
ec8b0508 chore: convert changelog to markdown (#5672)
e6256684 fix(cmake): error wasn't triggering (#5676)
7319402a chore: show preview on docs changes (#5673)
3867c5f5 ci: add nightlies for scientific-python (#5675)
9e6fe464 chore: consolidate common code in PYBIND11_MODULE and PYBIND11_EMBEDDED_MODULE (#5670)
67424358 fix(types): add typing and collections.abc module prefix (#5663)
4587d33c docs: prepare for v3.0.0rc1 (#5589)
cc86e8b2 fix(cmake): better --fresh support (#5668)
6bf25d1e feat: add semi-public API: `pybind11::detail::is_holder_constructed` (#5669)
9afc9c4f feat: change PYBIND11_EMBEDDED_MODULE to multiphase init (#5665)
094343c7 fix: support Python 3.14 (#5646)
1107c093 docs: Add documentation for mod_gil_not_used and multiple_interpreters (#5659)
af231a60 chore: use scikit-build-core for the build (#5598)
6aa3b335 fix(types): Buffer type hint (#5662)
95e8f89b Support for sub-interpreters (#5564)
05a6a03e chore(cmake): add CMake presets (#5655)
853bafa0 fix: use original dict (#5658)
c5dc6f9f ci: bump default versions (#5657)
74b52427 feat: add `py::potentially_slicing_weak_ptr(handle)` function (#5624)
ce42c4df fix(cmake): avoid message if FINDPYTHON NEW (#5656)
d7d782c5 fix(regression): support embedded submodule (#5650)
9a191c24 Fix typos for FindPython compact mode: `Python_LIRAR{Y,IES}` -> `Python_LIBRAR{Y,IES}` (#5653)
c125cc78 Collect all `#define PYBIND11_HAS_...` in pybind11/detail/common.h (#5647)
002c05b1 fix: handle MSVC warning C4866: compiler may not enforce left-to-right evaluation order (#5641)
a265a4cf fix: define _DEBUG macro to 1 on redefinition (#5639)
099583c5 chore(deps): update pre-commit hooks (#5642)
c630e22c Add `static_assert`s to enforce that `py::smart_holder` is combined with `py::trampoline_self_life_support` (#5633)
c7f3460f Fix gcc compiler warnings (#5523)
d3fee429 chore(deps): bump astral-sh/setup-uv from 5 to 6 in the actions group (#5632)
bc4a66df fix: provide useful behavior of default `py::slice` (#5620)
5c498583 fix: upgrade 20.04 runners to 22.04 (fix for ICC, NVHPC) (#5621)
223e2e9d Fix missing pythonic type hints for native_enum (#5619)
3c586340 Add class doc string to native_enum (#5617)
b3bb31ca ci: work on speeding up further (#5613)
cbcc2385 Factor out pybind11/gil_simple.h (#5614)
ee04df0d Updated STL casters and py::buffer to use collections.abc (#5566)
f3c19138 Remove obsolete `"E501"` line in pyproject.toml (#5539)
662a88cb ci: speed up ci a bit by thinning out matrix (#5602)
a2951abb chore(deps): update pre-commit hooks (#5605)
d25e91fb fix(cmake): warning about missing file (#5612)
31e52b2c Add holder caster traits tests in test_smart_ptr.cpp,py (#5603)
e38beb96 [skip ci] Move "Pitfalls with raw pointers and shared ownership" section to a more prominent location. (#5611)
1bd1d1ce Change `PyCFunction` cast in function_record_pyobject.h to sidestep unhelpful compiler warnings. (#5608)
708ce4d9 Fix GraalPy version parsing on dev builds (#5609)
a28ea8cc Eliminate `pybindit` namespace (#5607)
6d1f28fe feat: remove make_simple_namespace (#5597)
73ad3099 fix: fully deprecate get_type_of (deprecated in 2.6 but no warning (#5596)
b70b8eb3 chore: require pytest 6 consistently (#5599)
fdab860a feat: drop PYBIND11_NUMPY_1_ONLY (#5595)
55b1357d chore: update nox and test deps (#5594)
8ef10a0e ci: update to GraalPy 24.2 and mention in README (#5586)
d27fdaa2 chore: update for CMake 4.0 (#5593)
e03ec306 Squashed function_record_std_launder/manuscript — 57b9a0af815d19b236b74be06a172bc5c9956618 — 2025-03-30 20:14:21 -0700 (#5592)
a34fcdc4 [ci skip] Response to question by gh-henryiii (pybind/pybind11#5580 (comment)) (#5591)
8726ed22 Fix build failure when `shared_ptr<T>` points to `private` `std::enable_shared_from_this` base (#5590)
e7e5d6e5 Make wrapped C++ functions pickleable (#5580)
8f00d1ee fix: set __file__ on submodules (#5584)
c1cd022f tests: Add test for `boost::histogram::func_transform` situation. (#5582)
f365314e Enable Conversions Between Native Python Enum Types and C++ Enums (#5555)
48eb5ad9 Remove PyPy 3.8 and 3.9 testing. Make a pass through the entire repo to remove obviously obsolete workarounds for PyPy < 3.10. (#5578)
566894d5 Fix null pointer dereference in `attr_with_type_hint` (#5576)
974eba77 Change PYBIND11_MODULE to use multi-phase init (PEP 489) (#5574)
97022f83 TEST: test passes on PyPy macOS (#5569)
6412615e Update NDArray[object] to be NDArray[numpy.object_] (#5571)
bb504dd8 fix: FindPython by default logic error (#5561)
655c60d8 docs: fix incorrect name (PYBIND11_NEWPYTHON) (#5570)
9f08625d Updated py::capsule type hint to use new types.CapsuleType (#5567)
dfe7e65b feat(types): Use `typing.SupportsInt` and `typing.SupportsFloat` and fix other typing based bugs. (#5540)
16b5abd4 chore: bump catch download to 2.13.10 (#5568)
d28904f1 feat: FindPython by default (#5553)
06e8ee2e chore(deps): bump actions/attest-build-provenance in the actions group (#5556)
d422fda1 chore(deps): bump jinja2 from 3.1.5 to 3.1.6 in /docs (#5554)
e24e300c chore(deps): update pre-commit hooks (#5547)
a822be20 chore(deps): bump the actions group with 2 updates (#5546)
ded70fe6 Add pkgconf-pypi entrypoint (#5552)
79be5c83 test: Explicitly mark char as signed in dtype tests (#5545)
2943a27a squash-merge smart_holder branch into master (#5542)
d8565ac7 Sync `Py_TPFLAGS_MANAGED_DICT` for PyPy3.11 across the codebase (#5537)
09b9f44a add recently released pypy3.11 (#5534)
73825f35 Improved reference_internal documentation (#5528)
b7c33009 Start pybind11v3: Remove all code for `PYBIND11_INTERNALS_VERSION`s `4` and `5` (#5530)
24152422 feat(types) Numpy.typing.NDArray (#5212)
34a118fd Add `release_gil_before_calling_cpp_dtor` annotation for `class_` (#5522)
c316cf36 Make PYBIND11_INTERNALS_VERSION 6 the default on all platforms. (#5512)
31d7c870 Remove some maybe-uninitialized warnings (#5516)
d2e7e8c6 chore(deps): update pre-commit hooks (#5513)
ab44b307 Skip transient crash on GraalPy on OS X (#5514)
8862cd4e chore(deps): bump seanmiddleditch/gha-setup-ninja in the actions group (#5509)
fe87568f PyPy 3.11 does not implement Py_TPFLAGS_MANAGED_DICT (#5508)
82845c3b chore(deps): bump actions/attest-build-provenance in the actions group (#5503)
924261e8 chore(cmake): Add an author warning that auto-calculated `PYTHON_MODULE_EXTENSION` may not respect `SETUPTOOLS_EXT_SUFFIX` during cross-compilation (#5495)
c19c291b feat: --extension-suffix for pybind11 command (#5360)
167bb5f2 fix(cmake): don't strip with BUILD_TYPE None (#5392)
1b7aa0bb feat: rework of arg/return type hints to support .noconvert() (#5486)
15d9dae1 Fix data race when using shared variables (free threading) (#5494)
945e251a chore(deps): bump jinja2 from 3.1.4 to 3.1.5 in /docs (#5490)
a09cf618 chore(deps): update pre-commit hooks (#5488)
c5ed9d4b Fix module type hint (#5469)
cf020a1d feat(types) Allow setting types for attributes (#5460)
5b503f7e chore(deps): bump actions/attest-build-provenance in the actions group (#5468)
3e419485 `PYBIND11_PLATFORM_ABI_ID` Modernization Continued (platforms other than MSVC) (#5439)
741d86f2 Drop Clang dev CI job (#5464)
3ebdc503 chore(deps): bump actions/attest-build-provenance in the actions group (#5461)
b17555f3 chore(deps): update pre-commit hooks (#5459)
1d09fc83 Option for arg/return type hints and correct typing for std::filesystem::path (#5450)
a6d1ff24 fix: make PYBIND11_WARNING_POP actually pop clang diagnostics (#5448)
e7c9b907 chore(deps): bump pypa/cibuildwheel in the actions group (#5451)
83b92ceb Try to fix reentrant write transient failures in tests (#5447)
330aae51 Remove mingw-w64-i686-python-numpy from mingw32 build (it does not seem to exist anymore). (#5445)
f41dae31 Add dtype::normalized_num and dtype::num_of (#5429)
b9fb3168 Add support for array_t<handle> and array_t<object> (#5427)
08095d9c Run pytest in verbose mode (#5443)
0ed20f26 chore(deps): bump actions/attest-build-provenance in the actions group (#5440)
7f94f24d feat(typing): allow annotate methods with `pos_only` when only have the `self` argument (#5403)
6d98d4d8 Add type hints for args and kwargs (#5357)
a90e2af8 Factor out pybind11/conduit/pybind11_platform_abi_id.h (#5375)
ec9c2681 Fix MSVC MT/MD incompatibility in PYBIND11_BUILD_ABI (#4953)
037310ea Use std::unique_ptr in pybind11_getbuffer (#5435)
ce2f0055 Fixed data race in all_type_info in free-threading mode (#5419)
f46f5be4 Fix incorrect link syntax in upgrade guide (#5434)
5c07feef chore(deps): update pre-commit hooks (#5432)
bc041de0 Fix buffer protocol implementation (#5407)
75e48c5f Skip transient tests on GraalPy (#5422)
f7e14e98 Address regression introduced in #5381 (#5396)
077e49fc Export libc++ exceptions (#5390)
f2907651 Fix #5399: iterator increment operator does not skip first item (#5400)
af67e873 docs/advanced A document about deadlock potential with C++ statics (#5394)
56e69a20 Print key in KeyError in map.__getitem__/__delitem__ (#5397)
c4a05f93 Add support for GraalPy (#5380)
7e418f49 Allow subclasses of py::args and py::kwargs (#5381)
1f8b4a7f fix(cmake): `NO_EXTRAS` in `pybind11_add_module` function partially working (#5378)
ad9fd39e chore(deps): bump pypa/cibuildwheel in the actions group (#5376)
1d9483ff Added exception translator specific mutex used with try_translate_exceptions (#5362)
a7910be6 Add warn disable for GGC 12 bound checking error (#5355)
0cf3a0f7 ci: PyPI attestations (#5374)
5b7c0b04 docs: update changelog for 2.13.6 (#5372)
ef5a9560 Enable type-safe interoperability between different independent Python/C++ bindings systems. (#5296)
5efc7439 chore(deps): bump the actions group with 2 updates (#5361)
8a801bdc chore(deps): update pre-commit hooks (#5350)
aeda49ed Properly translate C++ exception to Python exception when creating Python buffer from wrapped object (#5324)
66c3774a Warnings wrappers to use from C++ (#5291)
65f4266c Add `while True` & `top` method to FAQ. (#5340)
3fb16ad1 fix: using `__cpp_nontype_template_args` instead of `__cpp_nontype_template_parameter_class` (#5330)
e8f595bb chore(deps): bump actions/attest-build-provenance in the actions group (#5335)
c2291e59 docs: prepare for 2.13.5 (#5327)
efa2b20d docs: clarify requirements for including pybind11 (#5326)
9966ad40 fix: allow -Wpedantic in C++20 mode (#5322)
2baf9d68 fix: `<ranges>` support for `py::tuple` and `py::list` (#5314)
7d85baa6 fix: never use `..` in a header include (#5321)
a1d00916 Backport of google/pybind11clif#30034 (#5305)
bd5951b6 docs: prepare for 2.13.4 (#5312)
28dbce41 feat: require CMake 3.15+ (#5304)
d893f972 fix: escape paths with spaces in pybind11-config (#4874)
fc97cc41 Revert "fix: quote paths from pybind11-config (#5302)" (#5309)
01169061 chore: remove repetitive words (#5308)
0d44d720 Make stl.h `list|set|map_caster` more user friendly. (#4686)
4a06eca5 docs: prepare for 2.13.3
8d9f4d50 fix: quote paths from pybind11-config (#5302)
1fe92c7b fix: emscripten cmake issue (#5301)
40f2c786 docs: prepare for 2.13.2 (#5299)
8d90b83b chore(deps): bump actions/attest-build-provenance in the actions group (#5297)
fc59f4e6 fix(cmake): add required emscripten flags (#5298)
89879448 Add `type_caster_std_function_specializations` feature. (#4597)
20551ab3 chore(deps): update pre-commit hooks (#5288)
84510538 chore(deps): bump the actions group with 2 updates (#5287)
916778df fix: typo in documentation (#5284)
72330728 feat: remove Python 3.7 support (#5191)
2e260b06 clang-tidy upgrade (to version 18) (#5272)
8e7307f0 docs: remove outdated known limitation. (#5263)
6d4805ce Small cleanup/refactoring in support of PR #5213 (#5251)
a582ca8a tests: run on pyodide (#4745)
dbf848af docs: extend `PYBIND11_MODULE` documentation, mention `mod_gil_not_used` (#5250)
43de8014 fix: make gil_safe_call_once thread-safe in free-threaded CPython (#5246)
ccefee4c chore(deps): bump actions/attest-build-provenance in the actions group (#5243)
50acb81b chore(deps): bump certifi from 2024.2.2 to 2024.7.4 in /docs (#5226)
bb05e081 Use PyMutex instead of std::mutex in free-threaded build. (#5219)
b21b0490 chore(deps): update pre-commit hooks (#5220)
d78446cc chore(deps): bump actions/attest-build-provenance in the actions group (#5216)
d805e996 feat(types) Adds special Case for empty C++ tuple type annotation (#5214)
51c2aa16 Fixed a compilation error with gcc 14 (#5208)
08f946a4 fix: add guard for GCC <10.3 on C++20 (#5205)
e0f9e774 fix(cmake): remove extra = in flto assignment (#5207)
57287b57 docs: prepare for 2.13.1 (#5203)
4bd538a4 feat(types): add support for Typing.Callable Special Case (#5202)
2e35470c fix: use manual padding of instance_map_shard (#5200)
895e6572 chore: back to work
REVERT: a2e59f0e chore: bump to 2.13.6
REVERT: e445ca2b ci: PyPI attestations (#5374)
REVERT: 7b67d8e9 docs: update changelog for 2.13.6 (#5372)
REVERT: a5fcc560 Enable type-safe interoperability between different independent Python/C++ bindings systems. (#5296)
REVERT: 54ab4249 chore(deps): bump the actions group with 2 updates (#5361)
REVERT: 36ee4674 chore(deps): update pre-commit hooks (#5350)
REVERT: 9e6a67d5 Properly translate C++ exception to Python exception when creating Python buffer from wrapped object (#5324)
REVERT: 570d323b Add `while True` & `top` method to FAQ. (#5340)
REVERT: b9f85757 fix: using `__cpp_nontype_template_args` instead of `__cpp_nontype_template_parameter_class` (#5330)
REVERT: 0a96ff7e chore(deps): bump actions/attest-build-provenance in the actions group (#5335)
REVERT: 7c33cdc2 chore: prepare for 2.13.5
REVERT: b3f5f2e7 docs: prepare for 2.13.5 (#5327)
REVERT: a4f6627d docs: clarify requirements for including pybind11 (#5326)
REVERT: 0d21cadc fix: allow -Wpedantic in C++20 mode (#5322)
REVERT: ff3ca786 fix: `<ranges>` support for `py::tuple` and `py::list` (#5314)
REVERT: b0050f30 fix: never use `..` in a header include (#5321)
REVERT: c6239a8a chore: version 2.13.4
REVERT: 63b0d146 docs: prepare for 2.13.4 (#5312)
REVERT: 973a16e9 fix: escape paths with spaces in pybind11-config (#4874)
REVERT: 75c11769 Revert "fix: quote paths from pybind11-config (#5302)" (#5309)
REVERT: 6685547e chore: remove repetitive words (#5308)
REVERT: bd676436 chore: prepare for 2.13.3
REVERT: 7662af69 docs: prepare for 2.13.3
REVERT: 45eaee91 fix: quote paths from pybind11-config (#5302)
REVERT: 835139f5 fix: emscripten cmake issue (#5301)
REVERT: 07f30430 chore: prepare for 2.13.2
REVERT: 6d5704cd docs: prepare for 2.13.2 (#5299)
REVERT: 6ee574fa chore(deps): bump actions/attest-build-provenance in the actions group (#5297)
REVERT: d8fcfe34 fix(cmake): add required emscripten flags (#5298)
REVERT: 78e26321 Add `type_caster_std_function_specializations` feature. (#4597)
REVERT: 44d0d9a4 chore(deps): update pre-commit hooks (#5288)
REVERT: fe808a01 chore(deps): bump the actions group with 2 updates (#5287)
REVERT: f9ae715d fix: typo in documentation (#5284)
REVERT: 042c3cfd clang-tidy upgrade (to version 18) (#5272)
REVERT: 667563dd docs: remove outdated known limitation. (#5263)
REVERT: 129934ad Small cleanup/refactoring in support of PR #5213 (#5251)
REVERT: f50830ea tests: run on pyodide (#4745)
REVERT: b4307453 docs: extend `PYBIND11_MODULE` documentation, mention `mod_gil_not_used` (#5250)
REVERT: f3a6d414 fix: make gil_safe_call_once thread-safe in free-threaded CPython (#5246)
REVERT: d699e99c chore(deps): bump actions/attest-build-provenance in the actions group (#5243)
REVERT: 4b2f7cd6 chore(deps): bump certifi from 2024.2.2 to 2024.7.4 in /docs (#5226)
REVERT: 8443d084 Use PyMutex instead of std::mutex in free-threaded build. (#5219)
REVERT: 41726b64 chore(deps): update pre-commit hooks (#5220)
REVERT: ea10a69d chore(deps): bump actions/attest-build-provenance in the actions group (#5216)
REVERT: a4dd41a1 feat(types) Adds special Case for empty C++ tuple type annotation (#5214)
REVERT: 639ca6a7 Fixed a compilation error with gcc 14 (#5208)
REVERT: 65afa13e fix: add guard for GCC <10.3 on C++20 (#5205)
REVERT: 3074608e fix(cmake): remove extra = in flto assignment (#5207)
REVERT: 941f45bc chore: prepare for 2.13.1
REVERT: 63020d33 docs: prepare for 2.13.1 (#5203)
REVERT: dd0e4a0b feat(types): add support for Typing.Callable Special Case (#5202)
REVERT: 3b47b464 fix: use manual padding of instance_map_shard (#5200)
git-subtree-dir: pybind11
git-subtree-split: f5fbe867d2d26e4a0a9177a51f6e568868ad3dc8
78381e5e28 Improve C++ test infrastructure: progress reporter, timeouts, and skip hanging Move Subinterpreter test (#5942)
3aeb113b0a chore(deps): bump the actions group across 1 directory with 5 updates (#5941)
d4f9cfbc28 Modernize NVHPC CI job (to make it working again): Ubuntu-24.04 runner, NVHPC 25.11 (#5935)
5b379161aa Apply clang-tidy fixes to subinterpreter support code (#5929)
1006933415 chore: also use typos (#5931)
41a4d0c4b6 Add Windows arm tests (#5932)
032e73d563 Replace C-style casts to static_cast and reinterpret_cast (#5930)
228f563610 Skip cross module exception translation on FreeBSD (#5925)
3ebbecb8af Add more readability tidy rules (#5924)
6651530963 Enforce more ruff rules (#5922)
1c1d01c8a1 Use well-known labels in `project.urls` (#5921)
1dc76208d5 chore(deps): bump urllib3 from 2.5.0 to 2.6.0 in /docs (#5920)
d810d4f039 chore(deps): update pre-commit hooks (#5918)
55e4bb9135 Work around GCC -Warray-bounds false positive in argument_vector (#5908)
734c29b25e Point main README.rst to CI for supported platforms and compilers (#5910)
ab9ac90fcd Replace deprecated macos-13 runners with macos-15-intel (#5916)
28ecc9b6a0 Disable Android cibuildwheel tests only on `ubuntu-latest` (#5915)
1fa9fad6d1 chore(deps): bump the actions group with 5 updates (#5912)
665461d063 Remove enum from bold in doc (#5903)
af796d0a99 Don't allow keep_alive or call_guard on properties (#5533)
42cda7570e Fix `*args/**kwargs` return types. Add type hinting to `py::make_tuple` (#5881)
8ecf10e8cc Fix crash in `gil_scoped_acquire` (#5828)
b30e72c6f6 Replace env.deprecated_call() with pytest.deprecated_call() (#5893)
3370fe14b7 Enhance: edit doc py::native_enum feature in upgrade.rst (#5885)
1ccaad5b12 chore: log_level is better than log_cli_level (#5890)
9f1187f97c Add `typing.SupportsIndex` to `int`/`float`/`complex` type hints (#5891)
73da78c3e4 chore(deps): update pre-commit hooks (#5888)
e6984c805e native_enum: add capsule containing enum information and cleanup logic (#5871)
15943963b3 fix dangling thread state issue (#5870)
1e5bc66e38 Factor out readable function signatures to avoid duplication (#5857)
cc36ac51a0 type_caster_generic: fix compiler error when casting a T that is implicitly convertible from T* (#5873)
a2c59711b2 type_caster_generic: add cast_sources abstraction (#5866)
fc423c948a Fix dangling pointer in internals::registered_types_cpp_fast from #5842 (#5867)
c7b4f66a73 type_caster_generic: add set_foreign_holder method for subclasses to implement (#5862)
9f75202191 Fix thread-safety in `get_local_type_info()` (#5856)
aa4259b4f8 chore(deps): update pre-commit hooks (#5820)
1cf0948d34 Avoid a heap allocation on every legacy py::enum_ load (#5860)
cae4ae083e docs: clarify to what extent bindings are actually global (#5859)
3262000195 Add fast_type_map, use it authoritatively for local types and as a hint for global types (ABI breaking) (#5842)
9ea197627d Use new 3.14 C APIs when available (#5854)
4dc33d6524 Fix `smart_holder` multiple/virtual inheritance bugs in `shared_ptr` and `unique_ptr` to-Python conversions (#5836)
0161da9d6d [skip ci] .gitignore: exclude __pycache__ directories (#5838)
81ffb1d5cc Add 90 minute limit for tests (#5851)
8ed0dab67f Add float type caster and revert type hint changes to int_ and float_ (#5839)
30748f863f Avoid heap allocation for function calls with a small number of args (#5824)
326b10637a Use thread_local instead of thread_specific_storage for internals (#5834)
d4d555d9e0 Restore `runs-on: windows-latest` (#5835)
937552f0ad Use thread_local for loader_life_support to improve performance (#5830)
68cbae6641 tests: add or delete copy/move ctors where needed to make type traits match reality (#5833)
a6581eee89 pytypes.h: constrain accessor::operator= templates so that they do not obscure special members (#5832)
7fb54e3065 chore(deps): bump the actions group with 3 updates (#5831)
852a4b5010 s/windows-2022/windows-latest/ in .github/workflows/{ci,pip}.yml (#5826)
ef0f1ff5f1 chore(deps): bump the actions group across 1 directory with 2 updates (#5818)
bf2d56e8ac Fix the first example in the first steps guide not compiling (#5823)
cd56888c89 Bring CI back to all-working condition (#5822)
3878c23f8d Fix typo in error message (#5817)
3c0ee89716 Fix compiler detection with clang-cl (#5816)
6e0d1c2400 chore: back to work
f5fbe867d2 chore: bump to 3.0.1 (#5810)
cddec2bb1d fix: limit warning issue (#5807)
e71489c314 tests: avoid false DOWNLOAD_CATCH manually-specified variables warning (#5803)
8bbc3091c8 Improve buffer_info type checking in numpy docs (#5805)
03607757fc correct homebrew package URL in installing.rst (#5808)
adb5603f60 chore: rename generic slots variable (#5793)
7aa3780dd4 Replace robotpy-build with semiwrap (#5804)
ce7122857a ci: avoid macOS 15 image change for iOS (#5798)
c1bf55a211 Fix subinterpreter exception handling SEGFAULT (#5795)
90bc05c7ae chore(deps): bump actions/download-artifact (#5792)
580494c7b4 fix: LTO warning of gcc >= 11.4 (#5791)
6292b704f6 Explain linting suppressions (#5790)
94c8250818 inline get_interpreter_state_uncheccked inline function (#5789)
23c59b6e3d ci: add android test (#5714)
a5665e3aca fix: type_caster_enum_type for pointer types (#5694) (#5776)
9360553f87 chore(deps): update pre-commit hooks (#5785)
c5e8fec920 Make function record subinterpreter safe (#5771)
0db3d59fdf Allow multiphase modules to be re-imported (#5782)
780ec11360 Make implicitly_convertable sub-interpreter and free-threading safe (#5777)
9af8adb712 Subinterpreter creation concurrency issues in 3.12 (#5779)
6972597c9b docs: show nogil in most examples (#5770)
33533ff3f8 Fix IsolatedConfig test (#5768)
7f5eea432e Check for __cpp_lib_remove_cvref as well (#5761)
49d19fef68 Implement binary version of make_index_sequence (#5751)
6aeae9c311 Fix py::trampoline_self_life_support visibility in docs (#5766)
316273efc8 fix: don't force -fvisibility=hidden on Windows (#5757)
c4ee83c498 fix:: initialize_generic compiler warning about nullptr dereference (#5756)
cc69a3789c chore(deps): update pre-commit hooks (#5745)
66d394f259 docs: standardize header a bit (#5749)
fa72aff53d [skip ci] Small `docs/release.rst` update, mainly to remove `git push --tags`. (#5748)
422990f842 chore: get back to work (after v3.0.0 release) (#5747)
ed5057ded6 chore: prepare for 3.0.0 (final) (#5746)
4dc4aca2e1 [skip ci] Explain: conduit feature only covers from-Python-to-C++ conversions (#5740)
03d8f48750 docs: fix typo in multiple_interpreters (#5738)
ea3e33e40d chore: prepare for 3.0.0rc4 (#5736)
bdc56d9e2e chore(deps): bump urllib3 from 2.2.2 to 2.5.0 in /docs (#5735)
cf3d1a75a2 feat: numpy scalars (#5726)
c60c14991d tests: handle 3.12 and 3.13 implementations and 3.14.0b3+ (#5732)
be507b725b ci: check latest on 3.13 (#5734)
f2c0ab83bc Fix TSan warning in sub-interpreter test (#5729)
ad9180c120 fix: android CMake support (#5733)
86e82ddbc2 Add support for `shared_ptr<const T>` in `py::init()` with `smart_holder` (#5731)
365d41a4ba Eliminate cross-DSO RTTI reliance in `smart_holder` functionality (for platforms like macOS). (#5728)
e2f86af216 docs: add documentation entry for warnings (#5356)
f3bb00732d better test for const only smart ptr (#5727)
d218b160a6 ci: avoid 3.13.4 on Windows (#5725)
f8640da401 chore(deps): bump pypa/cibuildwheel from 3.0.0rc2 to 3.0 in the actions group (#5721)
7ed76e2d50 fix: add support for const-only smart pointers (#5718)
513d1f962e ci: check iOS update (#5717)
ff0e381d9e chore(deps): bump requests from 2.32.3 to 2.32.4 in /docs (#5720)
6c5d25aae2 test: run pytest under Python devmode (#5715)
5d32ed76c0 docs: prepare for RC 3 (#5713)
c786d34f60 fix: handle null `py::handle` and add tests for `py::scoped_critical_section` (#5706)
c7026d0d1c fix!: modify the internals pointer-to-pointer implementation to not use `thread_local` (#5709)
b19489145b fix: expose required symbol using clang (#5700)
d4d2ec1ad8 ci: avoid brownout (and removal) of windows-2019 (#5712)
0985052ad6 chore(deps): update pre-commit hooks (#5711)
9295c4a568 fix: follow rest of pybind11 closer with PYBIND11_HAS_SUBINTERPRETER_SUPPORT (#5710)
7da1d53df5 ci: test on iOS (#5705)
c2b32b1e3b fix(types): type hints from future python versions (#5693)
21c9dd11bc ci: drop main tests on main
e4873e8f59 fix: allow subinterp support to be disabled
33fb53335e fix: C++20 in Windows
bc557a9b5b tests: add PYBIND11_TEST_SMART_HOLDER to tests
29979761ba ci: rename cibw workflow file
7e672ca106 tests: support C++23 in tests
ef2ad42d2d ci: list all jobs explicitly
5dff3354fc ci: reduce runs on draft PRs
df595b1657 docs: changelog update for 3.0.0rc2
a1b1972241 chore: prepare for 3.0.0rc2 (#5698)
a18b1bc4dc tests: always disable on the nogil build (#5701)
57e27c1ffc tests: skip some flaky gil tests on nogil (#5699)
1c10d5e9b1 fix: prepare for 3.14 beta 2 (#5697)
6e3e8515e7 fix(cmake): regression in include gaurd (#5691)
03b4a9e56f fix: don't destruct module objects in atexit (#5688)
1dd85ef42a chore: bump maximum clang tested to 20 (#5692)
9d06626521 docs: more warnings about locking and the GIL (#5689)
d7769de533 feat: scoped_critical_section (#5684)
e3883dd5d5 refactor: use CPython macros to construct `PYBIND11_VERSION_HEX` (#5683)
e4622cbd7b chore(cmake): add compile commands to preset (#5685)
98bd78f063 chore: rename macro `PYBIND11_SUBINTERPRETER_SUPPORT` -> `PYBIND11_HAS_SUBINTERPRETER_SUPPORT` to meet naming convention (#5682)
8d503e30be docs: update contributing/release guide a little (#5681)
2624d4a360 tests: expect free-threaded import warnings (#5680)
fc888f758f docs: prepare for 3.0.0rc1 (#5679)
e8f16e2fdd docs: remove setup.py mentions, mention presets (#5677)
07d028f218 feat: Embeded sub-interpreters (#5666)
ec8b050824 chore: convert changelog to markdown (#5672)
e625668439 fix(cmake): error wasn't triggering (#5676)
7319402a9f chore: show preview on docs changes (#5673)
3867c5f5a8 ci: add nightlies for scientific-python (#5675)
9e6fe464be chore: consolidate common code in PYBIND11_MODULE and PYBIND11_EMBEDDED_MODULE (#5670)
67424358f4 fix(types): add typing and collections.abc module prefix (#5663)
4587d33cf9 docs: prepare for v3.0.0rc1 (#5589)
cc86e8b2a6 fix(cmake): better --fresh support (#5668)
6bf25d1e39 feat: add semi-public API: `pybind11::detail::is_holder_constructed` (#5669)
9afc9c4ffb feat: change PYBIND11_EMBEDDED_MODULE to multiphase init (#5665)
094343c74a fix: support Python 3.14 (#5646)
1107c0936e docs: Add documentation for mod_gil_not_used and multiple_interpreters (#5659)
af231a6054 chore: use scikit-build-core for the build (#5598)
6aa3b335f4 fix(types): Buffer type hint (#5662)
95e8f89be1 Support for sub-interpreters (#5564)
05a6a03e7d chore(cmake): add CMake presets (#5655)
853bafa0a2 fix: use original dict (#5658)
c5dc6f9fb7 ci: bump default versions (#5657)
74b5242713 feat: add `py::potentially_slicing_weak_ptr(handle)` function (#5624)
ce42c4df48 fix(cmake): avoid message if FINDPYTHON NEW (#5656)
d7d782c5e0 fix(regression): support embedded submodule (#5650)
9a191c245d Fix typos for FindPython compact mode: `Python_LIRAR{Y,IES}` -> `Python_LIBRAR{Y,IES}` (#5653)
c125cc789c Collect all `#define PYBIND11_HAS_...` in pybind11/detail/common.h (#5647)
002c05b17e fix: handle MSVC warning C4866: compiler may not enforce left-to-right evaluation order (#5641)
a265a4cf31 fix: define _DEBUG macro to 1 on redefinition (#5639)
099583c5fb chore(deps): update pre-commit hooks (#5642)
c630e22c1c Add `static_assert`s to enforce that `py::smart_holder` is combined with `py::trampoline_self_life_support` (#5633)
c7f3460f18 Fix gcc compiler warnings (#5523)
d3fee42905 chore(deps): bump astral-sh/setup-uv from 5 to 6 in the actions group (#5632)
bc4a66dff0 fix: provide useful behavior of default `py::slice` (#5620)
5c498583cc fix: upgrade 20.04 runners to 22.04 (fix for ICC, NVHPC) (#5621)
223e2e9da2 Fix missing pythonic type hints for native_enum (#5619)
3c586340fb Add class doc string to native_enum (#5617)
b3bb31ca51 ci: work on speeding up further (#5613)
cbcc23855e Factor out pybind11/gil_simple.h (#5614)
ee04df0d02 Updated STL casters and py::buffer to use collections.abc (#5566)
f3c1913827 Remove obsolete `"E501"` line in pyproject.toml (#5539)
662a88cbc1 ci: speed up ci a bit by thinning out matrix (#5602)
a2951abbec chore(deps): update pre-commit hooks (#5605)
d25e91fb8f fix(cmake): warning about missing file (#5612)
31e52b2cd3 Add holder caster traits tests in test_smart_ptr.cpp,py (#5603)
e38beb96c4 [skip ci] Move "Pitfalls with raw pointers and shared ownership" section to a more prominent location. (#5611)
1bd1d1ced8 Change `PyCFunction` cast in function_record_pyobject.h to sidestep unhelpful compiler warnings. (#5608)
708ce4d9c7 Fix GraalPy version parsing on dev builds (#5609)
a28ea8ccc5 Eliminate `pybindit` namespace (#5607)
6d1f28fe2b feat: remove make_simple_namespace (#5597)
73ad3099fb fix: fully deprecate get_type_of (deprecated in 2.6 but no warning (#5596)
b70b8eb332 chore: require pytest 6 consistently (#5599)
fdab860a32 feat: drop PYBIND11_NUMPY_1_ONLY (#5595)
55b1357d8e chore: update nox and test deps (#5594)
8ef10a0ec9 ci: update to GraalPy 24.2 and mention in README (#5586)
d27fdaa272 chore: update for CMake 4.0 (#5593)
e03ec30632 Squashed function_record_std_launder/manuscript — 57b9a0af815d19b236b74be06a172bc5c9956618 — 2025-03-30 20:14:21 -0700 (#5592)
a34fcdc48d [ci skip] Response to question by gh-henryiii (pybind/pybind11#5580 (comment)) (#5591)
8726ed22d8 Fix build failure when `shared_ptr<T>` points to `private` `std::enable_shared_from_this` base (#5590)
e7e5d6e5bb Make wrapped C++ functions pickleable (#5580)
8f00d1eea0 fix: set __file__ on submodules (#5584)
c1cd022f16 tests: Add test for `boost::histogram::func_transform` situation. (#5582)
f365314ec0 Enable Conversions Between Native Python Enum Types and C++ Enums (#5555)
48eb5ad9b9 Remove PyPy 3.8 and 3.9 testing. Make a pass through the entire repo to remove obviously obsolete workarounds for PyPy < 3.10. (#5578)
566894d5f1 Fix null pointer dereference in `attr_with_type_hint` (#5576)
974eba77a5 Change PYBIND11_MODULE to use multi-phase init (PEP 489) (#5574)
97022f83ce TEST: test passes on PyPy macOS (#5569)
6412615ebb Update NDArray[object] to be NDArray[numpy.object_] (#5571)
bb504dd809 fix: FindPython by default logic error (#5561)
655c60d84c docs: fix incorrect name (PYBIND11_NEWPYTHON) (#5570)
9f08625d60 Updated py::capsule type hint to use new types.CapsuleType (#5567)
dfe7e65b45 feat(types): Use `typing.SupportsInt` and `typing.SupportsFloat` and fix other typing based bugs. (#5540)
16b5abd428 chore: bump catch download to 2.13.10 (#5568)
d28904f12e feat: FindPython by default (#5553)
06e8ee2e35 chore(deps): bump actions/attest-build-provenance in the actions group (#5556)
d422fda125 chore(deps): bump jinja2 from 3.1.5 to 3.1.6 in /docs (#5554)
e24e300c75 chore(deps): update pre-commit hooks (#5547)
a822be20d7 chore(deps): bump the actions group with 2 updates (#5546)
ded70fe605 Add pkgconf-pypi entrypoint (#5552)
79be5c8316 test: Explicitly mark char as signed in dtype tests (#5545)
2943a27a14 squash-merge smart_holder branch into master (#5542)
d8565ac731 Sync `Py_TPFLAGS_MANAGED_DICT` for PyPy3.11 across the codebase (#5537)
09b9f44ab7 add recently released pypy3.11 (#5534)
73825f351b Improved reference_internal documentation (#5528)
b7c33009ac Start pybind11v3: Remove all code for `PYBIND11_INTERNALS_VERSION`s `4` and `5` (#5530)
241524223a feat(types) Numpy.typing.NDArray (#5212)
34a118fd36 Add `release_gil_before_calling_cpp_dtor` annotation for `class_` (#5522)
c316cf3620 Make PYBIND11_INTERNALS_VERSION 6 the default on all platforms. (#5512)
31d7c870cf Remove some maybe-uninitialized warnings (#5516)
d2e7e8c687 chore(deps): update pre-commit hooks (#5513)
ab44b307b2 Skip transient crash on GraalPy on OS X (#5514)
8862cd4e7d chore(deps): bump seanmiddleditch/gha-setup-ninja in the actions group (#5509)
fe87568f0b PyPy 3.11 does not implement Py_TPFLAGS_MANAGED_DICT (#5508)
82845c3b48 chore(deps): bump actions/attest-build-provenance in the actions group (#5503)
924261e814 chore(cmake): Add an author warning that auto-calculated `PYTHON_MODULE_EXTENSION` may not respect `SETUPTOOLS_EXT_SUFFIX` during cross-compilation (#5495)
c19c291b98 feat: --extension-suffix for pybind11 command (#5360)
167bb5f271 fix(cmake): don't strip with BUILD_TYPE None (#5392)
1b7aa0bb66 feat: rework of arg/return type hints to support .noconvert() (#5486)
15d9dae14b Fix data race when using shared variables (free threading) (#5494)
945e251a6c chore(deps): bump jinja2 from 3.1.4 to 3.1.5 in /docs (#5490)
a09cf61844 chore(deps): update pre-commit hooks (#5488)
c5ed9d4b19 Fix module type hint (#5469)
cf020a1de2 feat(types) Allow setting types for attributes (#5460)
5b503f7ec9 chore(deps): bump actions/attest-build-provenance in the actions group (#5468)
3e419485c3 `PYBIND11_PLATFORM_ABI_ID` Modernization Continued (platforms other than MSVC) (#5439)
741d86f2e3 Drop Clang dev CI job (#5464)
3ebdc503d2 chore(deps): bump actions/attest-build-provenance in the actions group (#5461)
b17555f340 chore(deps): update pre-commit hooks (#5459)
1d09fc8300 Option for arg/return type hints and correct typing for std::filesystem::path (#5450)
a6d1ff2460 fix: make PYBIND11_WARNING_POP actually pop clang diagnostics (#5448)
e7c9b90739 chore(deps): bump pypa/cibuildwheel in the actions group (#5451)
83b92ceb35 Try to fix reentrant write transient failures in tests (#5447)
330aae51cf Remove mingw-w64-i686-python-numpy from mingw32 build (it does not seem to exist anymore). (#5445)
f41dae31a3 Add dtype::normalized_num and dtype::num_of (#5429)
b9fb3168ab Add support for array_t<handle> and array_t<object> (#5427)
08095d9c70 Run pytest in verbose mode (#5443)
0ed20f26ac chore(deps): bump actions/attest-build-provenance in the actions group (#5440)
7f94f24d64 feat(typing): allow annotate methods with `pos_only` when only have the `self` argument (#5403)
6d98d4d8d4 Add type hints for args and kwargs (#5357)
a90e2af88d Factor out pybind11/conduit/pybind11_platform_abi_id.h (#5375)
ec9c26817f Fix MSVC MT/MD incompatibility in PYBIND11_BUILD_ABI (#4953)
037310ea8a Use std::unique_ptr in pybind11_getbuffer (#5435)
ce2f005594 Fixed data race in all_type_info in free-threading mode (#5419)
f46f5be4fa Fix incorrect link syntax in upgrade guide (#5434)
5c07feef2f chore(deps): update pre-commit hooks (#5432)
bc041de0db Fix buffer protocol implementation (#5407)
75e48c5f95 Skip transient tests on GraalPy (#5422)
f7e14e985b Address regression introduced in #5381 (#5396)
077e49fcd6 Export libc++ exceptions (#5390)
f2907651fa Fix #5399: iterator increment operator does not skip first item (#5400)
af67e87393 docs/advanced A document about deadlock potential with C++ statics (#5394)
56e69a20a5 Print key in KeyError in map.__getitem__/__delitem__ (#5397)
c4a05f9344 Add support for GraalPy (#5380)
7e418f4924 Allow subclasses of py::args and py::kwargs (#5381)
1f8b4a7f1a fix(cmake): `NO_EXTRAS` in `pybind11_add_module` function partially working (#5378)
ad9fd39e14 chore(deps): bump pypa/cibuildwheel in the actions group (#5376)
1d9483ff73 Added exception translator specific mutex used with try_translate_exceptions (#5362)
a7910be630 Add warn disable for GGC 12 bound checking error (#5355)
0cf3a0f7b5 ci: PyPI attestations (#5374)
5b7c0b04b9 docs: update changelog for 2.13.6 (#5372)
ef5a9560bb Enable type-safe interoperability between different independent Python/C++ bindings systems. (#5296)
5efc7439d4 chore(deps): bump the actions group with 2 updates (#5361)
8a801bdc32 chore(deps): update pre-commit hooks (#5350)
aeda49ed0b Properly translate C++ exception to Python exception when creating Python buffer from wrapped object (#5324)
66c3774a64 Warnings wrappers to use from C++ (#5291)
65f4266cef Add `while True` & `top` method to FAQ. (#5340)
3fb16ad175 fix: using `__cpp_nontype_template_args` instead of `__cpp_nontype_template_parameter_class` (#5330)
e8f595bb85 chore(deps): bump actions/attest-build-provenance in the actions group (#5335)
c2291e597f docs: prepare for 2.13.5 (#5327)
efa2b20d69 docs: clarify requirements for including pybind11 (#5326)
9966ad409d fix: allow -Wpedantic in C++20 mode (#5322)
2baf9d6833 fix: `<ranges>` support for `py::tuple` and `py::list` (#5314)
7d85baa6a1 fix: never use `..` in a header include (#5321)
a1d00916b2 Backport of google/pybind11clif#30034 (#5305)
bd5951b691 docs: prepare for 2.13.4 (#5312)
28dbce4157 feat: require CMake 3.15+ (#5304)
d893f9723a fix: escape paths with spaces in pybind11-config (#4874)
fc97cc41d5 Revert "fix: quote paths from pybind11-config (#5302)" (#5309)
0116906189 chore: remove repetitive words (#5308)
0d44d720cb Make stl.h `list|set|map_caster` more user friendly. (#4686)
4a06eca591 docs: prepare for 2.13.3
8d9f4d50cc fix: quote paths from pybind11-config (#5302)
1fe92c7b35 fix: emscripten cmake issue (#5301)
40f2c7863b docs: prepare for 2.13.2 (#5299)
8d90b83b19 chore(deps): bump actions/attest-build-provenance in the actions group (#5297)
fc59f4e6e5 fix(cmake): add required emscripten flags (#5298)
898794488a Add `type_caster_std_function_specializations` feature. (#4597)
20551ab3d8 chore(deps): update pre-commit hooks (#5288)
845105383f chore(deps): bump the actions group with 2 updates (#5287)
916778df48 fix: typo in documentation (#5284)
723307283e feat: remove Python 3.7 support (#5191)
2e260b067f clang-tidy upgrade (to version 18) (#5272)
8e7307f069 docs: remove outdated known limitation. (#5263)
6d4805ced1 Small cleanup/refactoring in support of PR #5213 (#5251)
a582ca8a8e tests: run on pyodide (#4745)
dbf848aff7 docs: extend `PYBIND11_MODULE` documentation, mention `mod_gil_not_used` (#5250)
43de8014f9 fix: make gil_safe_call_once thread-safe in free-threaded CPython (#5246)
ccefee4c31 chore(deps): bump actions/attest-build-provenance in the actions group (#5243)
50acb81b0a chore(deps): bump certifi from 2024.2.2 to 2024.7.4 in /docs (#5226)
bb05e0810b Use PyMutex instead of std::mutex in free-threaded build. (#5219)
b21b049029 chore(deps): update pre-commit hooks (#5220)
d78446cc2b chore(deps): bump actions/attest-build-provenance in the actions group (#5216)
d805e9967f feat(types) Adds special Case for empty C++ tuple type annotation (#5214)
51c2aa16de Fixed a compilation error with gcc 14 (#5208)
08f946a431 fix: add guard for GCC <10.3 on C++20 (#5205)
e0f9e77466 fix(cmake): remove extra = in flto assignment (#5207)
57287b578d docs: prepare for 2.13.1 (#5203)
4bd538a40a feat(types): add support for Typing.Callable Special Case (#5202)
2e35470cff fix: use manual padding of instance_map_shard (#5200)
895e657220 chore: back to work
REVERT: 7c33cdc chore: prepare for 2.13.5
REVERT: b3f5f2e docs: prepare for 2.13.5 (#5327)
REVERT: a4f6627 docs: clarify requirements for including pybind11 (#5326)
REVERT: 0d21cad fix: allow -Wpedantic in C++20 mode (#5322)
REVERT: ff3ca78 fix: `<ranges>` support for `py::tuple` and `py::list` (#5314)
REVERT: b0050f3 fix: never use `..` in a header include (#5321)
REVERT: c6239a8 chore: version 2.13.4
REVERT: 63b0d14 docs: prepare for 2.13.4 (#5312)
REVERT: 973a16e fix: escape paths with spaces in pybind11-config (#4874)
REVERT: 75c1176 Revert "fix: quote paths from pybind11-config (#5302)" (#5309)
REVERT: 6685547 chore: remove repetitive words (#5308)
REVERT: bd67643 chore: prepare for 2.13.3
REVERT: 7662af6 docs: prepare for 2.13.3
REVERT: 45eaee9 fix: quote paths from pybind11-config (#5302)
REVERT: 835139f fix: emscripten cmake issue (#5301)
REVERT: 07f3043 chore: prepare for 2.13.2
REVERT: 6d5704c docs: prepare for 2.13.2 (#5299)
REVERT: 6ee574f chore(deps): bump actions/attest-build-provenance in the actions group (#5297)
REVERT: d8fcfe3 fix(cmake): add required emscripten flags (#5298)
REVERT: 78e2632 Add `type_caster_std_function_specializations` feature. (#4597)
REVERT: 44d0d9a chore(deps): update pre-commit hooks (#5288)
REVERT: fe808a0 chore(deps): bump the actions group with 2 updates (#5287)
REVERT: f9ae715 fix: typo in documentation (#5284)
REVERT: 042c3cf clang-tidy upgrade (to version 18) (#5272)
REVERT: 667563d docs: remove outdated known limitation. (#5263)
REVERT: 129934a Small cleanup/refactoring in support of PR #5213 (#5251)
REVERT: f50830e tests: run on pyodide (#4745)
REVERT: b430745 docs: extend `PYBIND11_MODULE` documentation, mention `mod_gil_not_used` (#5250)
REVERT: f3a6d41 fix: make gil_safe_call_once thread-safe in free-threaded CPython (#5246)
REVERT: d699e99 chore(deps): bump actions/attest-build-provenance in the actions group (#5243)
REVERT: 4b2f7cd chore(deps): bump certifi from 2024.2.2 to 2024.7.4 in /docs (#5226)
REVERT: 8443d08 Use PyMutex instead of std::mutex in free-threaded build. (#5219)
REVERT: 41726b6 chore(deps): update pre-commit hooks (#5220)
REVERT: ea10a69 chore(deps): bump actions/attest-build-provenance in the actions group (#5216)
REVERT: a4dd41a feat(types) Adds special Case for empty C++ tuple type annotation (#5214)
REVERT: 639ca6a Fixed a compilation error with gcc 14 (#5208)
REVERT: 65afa13 fix: add guard for GCC <10.3 on C++20 (#5205)
REVERT: 3074608 fix(cmake): remove extra = in flto assignment (#5207)
REVERT: 941f45b chore: prepare for 2.13.1
REVERT: 63020d3 docs: prepare for 2.13.1 (#5203)
REVERT: dd0e4a0 feat(types): add support for Typing.Callable Special Case (#5202)
REVERT: 3b47b46 fix: use manual padding of instance_map_shard (#5200)
git-subtree-dir: tpls/pybind11
git-subtree-split: 78381e5e281f3d329f0bc85f43a2da8a476968a1
a2e59f0e7 chore: bump to 2.13.6
e445ca2bd ci: PyPI attestations (#5374)
7b67d8e97 docs: update changelog for 2.13.6 (#5372)
a5fcc5602 Enable type-safe interoperability between different independent Python/C++ bindings systems. (#5296)
54ab42496 chore(deps): bump the actions group with 2 updates (#5361)
36ee4674f chore(deps): update pre-commit hooks (#5350)
9e6a67d57 Properly translate C++ exception to Python exception when creating Python buffer from wrapped object (#5324)
570d323bb Add `while True` & `top` method to FAQ. (#5340)
b9f85757d fix: using `__cpp_nontype_template_args` instead of `__cpp_nontype_template_parameter_class` (#5330)
0a96ff7e9 chore(deps): bump actions/attest-build-provenance in the actions group (#5335)
7c33cdc2d chore: prepare for 2.13.5
b3f5f2e74 docs: prepare for 2.13.5 (#5327)
a4f6627da docs: clarify requirements for including pybind11 (#5326)
0d21cadca fix: allow -Wpedantic in C++20 mode (#5322)
ff3ca7864 fix: `<ranges>` support for `py::tuple` and `py::list` (#5314)
b0050f30d fix: never use `..` in a header include (#5321)
c6239a8a1 chore: version 2.13.4
63b0d146d docs: prepare for 2.13.4 (#5312)
973a16e9a fix: escape paths with spaces in pybind11-config (#4874)
75c11769b Revert "fix: quote paths from pybind11-config (#5302)" (#5309)
6685547e3 chore: remove repetitive words (#5308)
bd6764365 chore: prepare for 2.13.3
7662af69c docs: prepare for 2.13.3
45eaee91d fix: quote paths from pybind11-config (#5302)
835139f5d fix: emscripten cmake issue (#5301)
07f30430d chore: prepare for 2.13.2
6d5704cd2 docs: prepare for 2.13.2 (#5299)
6ee574fab chore(deps): bump actions/attest-build-provenance in the actions group (#5297)
d8fcfe341 fix(cmake): add required emscripten flags (#5298)
78e26321c Add `type_caster_std_function_specializations` feature. (#4597)
44d0d9a41 chore(deps): update pre-commit hooks (#5288)
fe808a011 chore(deps): bump the actions group with 2 updates (#5287)
f9ae715d4 fix: typo in documentation (#5284)
042c3cfdc clang-tidy upgrade (to version 18) (#5272)
667563dd5 docs: remove outdated known limitation. (#5263)
129934ad9 Small cleanup/refactoring in support of PR #5213 (#5251)
f50830eae tests: run on pyodide (#4745)
b43074533 docs: extend `PYBIND11_MODULE` documentation, mention `mod_gil_not_used` (#5250)
f3a6d4145 fix: make gil_safe_call_once thread-safe in free-threaded CPython (#5246)
d699e99c5 chore(deps): bump actions/attest-build-provenance in the actions group (#5243)
4b2f7cd65 chore(deps): bump certifi from 2024.2.2 to 2024.7.4 in /docs (#5226)
8443d0841 Use PyMutex instead of std::mutex in free-threaded build. (#5219)
41726b643 chore(deps): update pre-commit hooks (#5220)
ea10a69da chore(deps): bump actions/attest-build-provenance in the actions group (#5216)
a4dd41a18 feat(types) Adds special Case for empty C++ tuple type annotation (#5214)
639ca6a71 Fixed a compilation error with gcc 14 (#5208)
65afa13eb fix: add guard for GCC <10.3 on C++20 (#5205)
3074608eb fix(cmake): remove extra = in flto assignment (#5207)
941f45bcb chore: prepare for 2.13.1
63020d336 docs: prepare for 2.13.1 (#5203)
dd0e4a0b8 feat(types): add support for Typing.Callable Special Case (#5202)
3b47b4648 fix: use manual padding of instance_map_shard (#5200)
REVERT: 0db3d59fd Allow multiphase modules to be re-imported (#5782)
REVERT: 780ec1136 Make implicitly_convertable sub-interpreter and free-threading safe (#5777)
REVERT: 9af8adb71 Subinterpreter creation concurrency issues in 3.12 (#5779)
REVERT: 6972597c9 docs: show nogil in most examples (#5770)
REVERT: 33533ff3f Fix IsolatedConfig test (#5768)
REVERT: 7f5eea432 Check for __cpp_lib_remove_cvref as well (#5761)
REVERT: 49d19fef6 Implement binary version of make_index_sequence (#5751)
REVERT: 6aeae9c31 Fix py::trampoline_self_life_support visibility in docs (#5766)
REVERT: 316273efc fix: don't force -fvisibility=hidden on Windows (#5757)
REVERT: c4ee83c49 fix:: initialize_generic compiler warning about nullptr dereference (#5756)
REVERT: cc69a3789 chore(deps): update pre-commit hooks (#5745)
REVERT: 66d394f25 docs: standardize header a bit (#5749)
REVERT: fa72aff53 [skip ci] Small `docs/release.rst` update, mainly to remove `git push --tags`. (#5748)
REVERT: 422990f84 chore: get back to work (after v3.0.0 release) (#5747)
REVERT: ed5057ded chore: prepare for 3.0.0 (final) (#5746)
REVERT: 4dc4aca2e [skip ci] Explain: conduit feature only covers from-Python-to-C++ conversions (#5740)
REVERT: 03d8f4875 docs: fix typo in multiple_interpreters (#5738)
REVERT: ea3e33e40 chore: prepare for 3.0.0rc4 (#5736)
REVERT: bdc56d9e2 chore(deps): bump urllib3 from 2.2.2 to 2.5.0 in /docs (#5735)
REVERT: cf3d1a75a feat: numpy scalars (#5726)
REVERT: c60c14991 tests: handle 3.12 and 3.13 implementations and 3.14.0b3+ (#5732)
REVERT: be507b725 ci: check latest on 3.13 (#5734)
REVERT: f2c0ab83b Fix TSan warning in sub-interpreter test (#5729)
REVERT: ad9180c12 fix: android CMake support (#5733)
REVERT: 86e82ddbc Add support for `shared_ptr<const T>` in `py::init()` with `smart_holder` (#5731)
REVERT: 365d41a4b Eliminate cross-DSO RTTI reliance in `smart_holder` functionality (for platforms like macOS). (#5728)
REVERT: e2f86af21 docs: add documentation entry for warnings (#5356)
REVERT: f3bb00732 better test for const only smart ptr (#5727)
REVERT: d218b160a ci: avoid 3.13.4 on Windows (#5725)
REVERT: f8640da40 chore(deps): bump pypa/cibuildwheel from 3.0.0rc2 to 3.0 in the actions group (#5721)
REVERT: 7ed76e2d5 fix: add support for const-only smart pointers (#5718)
REVERT: 513d1f962 ci: check iOS update (#5717)
REVERT: ff0e381d9 chore(deps): bump requests from 2.32.3 to 2.32.4 in /docs (#5720)
REVERT: 6c5d25aae test: run pytest under Python devmode (#5715)
REVERT: 5d32ed76c docs: prepare for RC 3 (#5713)
REVERT: c786d34f6 fix: handle null `py::handle` and add tests for `py::scoped_critical_section` (#5706)
REVERT: c7026d0d1 fix!: modify the internals pointer-to-pointer implementation to not use `thread_local` (#5709)
REVERT: b19489145 fix: expose required symbol using clang (#5700)
REVERT: d4d2ec1ad ci: avoid brownout (and removal) of windows-2019 (#5712)
REVERT: 0985052ad chore(deps): update pre-commit hooks (#5711)
REVERT: 9295c4a56 fix: follow rest of pybind11 closer with PYBIND11_HAS_SUBINTERPRETER_SUPPORT (#5710)
REVERT: 7da1d53df ci: test on iOS (#5705)
REVERT: c2b32b1e3 fix(types): type hints from future python versions (#5693)
REVERT: 21c9dd11b ci: drop main tests on main
REVERT: e4873e8f5 fix: allow subinterp support to be disabled
REVERT: 33fb53335 fix: C++20 in Windows
REVERT: bc557a9b5 tests: add PYBIND11_TEST_SMART_HOLDER to tests
REVERT: 29979761b ci: rename cibw workflow file
REVERT: 7e672ca10 tests: support C++23 in tests
REVERT: ef2ad42d2 ci: list all jobs explicitly
REVERT: 5dff3354f ci: reduce runs on draft PRs
REVERT: df595b165 docs: changelog update for 3.0.0rc2
REVERT: a1b197224 chore: prepare for 3.0.0rc2 (#5698)
REVERT: a18b1bc4d tests: always disable on the nogil build (#5701)
REVERT: 57e27c1ff tests: skip some flaky gil tests on nogil (#5699)
REVERT: 1c10d5e9b fix: prepare for 3.14 beta 2 (#5697)
REVERT: 6e3e8515e fix(cmake): regression in include gaurd (#5691)
REVERT: 03b4a9e56 fix: don't destruct module objects in atexit (#5688)
REVERT: 1dd85ef42 chore: bump maximum clang tested to 20 (#5692)
REVERT: 9d0662652 docs: more warnings about locking and the GIL (#5689)
REVERT: d7769de53 feat: scoped_critical_section (#5684)
REVERT: e3883dd5d refactor: use CPython macros to construct `PYBIND11_VERSION_HEX` (#5683)
REVERT: e4622cbd7 chore(cmake): add compile commands to preset (#5685)
REVERT: 98bd78f06 chore: rename macro `PYBIND11_SUBINTERPRETER_SUPPORT` -> `PYBIND11_HAS_SUBINTERPRETER_SUPPORT` to meet naming convention (#5682)
REVERT: 8d503e30b docs: update contributing/release guide a little (#5681)
REVERT: 2624d4a36 tests: expect free-threaded import warnings (#5680)
REVERT: fc888f758 docs: prepare for 3.0.0rc1 (#5679)
REVERT: e8f16e2fd docs: remove setup.py mentions, mention presets (#5677)
REVERT: 07d028f21 feat: Embeded sub-interpreters (#5666)
REVERT: ec8b05082 chore: convert changelog to markdown (#5672)
REVERT: e62566843 fix(cmake): error wasn't triggering (#5676)
REVERT: 7319402a9 chore: show preview on docs changes (#5673)
REVERT: 3867c5f5a ci: add nightlies for scientific-python (#5675)
REVERT: 9e6fe464b chore: consolidate common code in PYBIND11_MODULE and PYBIND11_EMBEDDED_MODULE (#5670)
REVERT: 67424358f fix(types): add typing and collections.abc module prefix (#5663)
REVERT: 4587d33cf docs: prepare for v3.0.0rc1 (#5589)
REVERT: cc86e8b2a fix(cmake): better --fresh support (#5668)
REVERT: 6bf25d1e3 feat: add semi-public API: `pybind11::detail::is_holder_constructed` (#5669)
REVERT: 9afc9c4ff feat: change PYBIND11_EMBEDDED_MODULE to multiphase init (#5665)
REVERT: 094343c74 fix: support Python 3.14 (#5646)
REVERT: 1107c0936 docs: Add documentation for mod_gil_not_used and multiple_interpreters (#5659)
REVERT: af231a605 chore: use scikit-build-core for the build (#5598)
REVERT: 6aa3b335f fix(types): Buffer type hint (#5662)
REVERT: 95e8f89be Support for sub-interpreters (#5564)
REVERT: 05a6a03e7 chore(cmake): add CMake presets (#5655)
REVERT: 853bafa0a fix: use original dict (#5658)
REVERT: c5dc6f9fb ci: bump default versions (#5657)
REVERT: 74b524271 feat: add `py::potentially_slicing_weak_ptr(handle)` function (#5624)
REVERT: ce42c4df4 fix(cmake): avoid message if FINDPYTHON NEW (#5656)
REVERT: d7d782c5e fix(regression): support embedded submodule (#5650)
REVERT: 9a191c245 Fix typos for FindPython compact mode: `Python_LIRAR{Y,IES}` -> `Python_LIBRAR{Y,IES}` (#5653)
REVERT: c125cc789 Collect all `#define PYBIND11_HAS_...` in pybind11/detail/common.h (#5647)
REVERT: 002c05b17 fix: handle MSVC warning C4866: compiler may not enforce left-to-right evaluation order (#5641)
REVERT: a265a4cf3 fix: define _DEBUG macro to 1 on redefinition (#5639)
REVERT: 099583c5f chore(deps): update pre-commit hooks (#5642)
REVERT: c630e22c1 Add `static_assert`s to enforce that `py::smart_holder` is combined with `py::trampoline_self_life_support` (#5633)
REVERT: c7f3460f1 Fix gcc compiler warnings (#5523)
REVERT: d3fee4290 chore(deps): bump astral-sh/setup-uv from 5 to 6 in the actions group (#5632)
REVERT: bc4a66dff fix: provide useful behavior of default `py::slice` (#5620)
REVERT: 5c498583c fix: upgrade 20.04 runners to 22.04 (fix for ICC, NVHPC) (#5621)
REVERT: 223e2e9da Fix missing pythonic type hints for native_enum (#5619)
REVERT: 3c586340f Add class doc string to native_enum (#5617)
REVERT: b3bb31ca5 ci: work on speeding up further (#5613)
REVERT: cbcc23855 Factor out pybind11/gil_simple.h (#5614)
REVERT: ee04df0d0 Updated STL casters and py::buffer to use collections.abc (#5566)
REVERT: f3c191382 Remove obsolete `"E501"` line in pyproject.toml (#5539)
REVERT: 662a88cbc ci: speed up ci a bit by thinning out matrix (#5602)
REVERT: a2951abbe chore(deps): update pre-commit hooks (#5605)
REVERT: d25e91fb8 fix(cmake): warning about missing file (#5612)
REVERT: 31e52b2cd Add holder caster traits tests in test_smart_ptr.cpp,py (#5603)
REVERT: e38beb96c [skip ci] Move "Pitfalls with raw pointers and shared ownership" section to a more prominent location. (#5611)
REVERT: 1bd1d1ced Change `PyCFunction` cast in function_record_pyobject.h to sidestep unhelpful compiler warnings. (#5608)
REVERT: 708ce4d9c Fix GraalPy version parsing on dev builds (#5609)
REVERT: a28ea8ccc Eliminate `pybindit` namespace (#5607)
REVERT: 6d1f28fe2 feat: remove make_simple_namespace (#5597)
REVERT: 73ad3099f fix: fully deprecate get_type_of (deprecated in 2.6 but no warning (#5596)
REVERT: b70b8eb33 chore: require pytest 6 consistently (#5599)
REVERT: fdab860a3 feat: drop PYBIND11_NUMPY_1_ONLY (#5595)
REVERT: 55b1357d8 chore: update nox and test deps (#5594)
REVERT: 8ef10a0ec ci: update to GraalPy 24.2 and mention in README (#5586)
REVERT: d27fdaa27 chore: update for CMake 4.0 (#5593)
REVERT: e03ec3063 Squashed function_record_std_launder/manuscript — 57b9a0af815d19b236b74be06a172bc5c9956618 — 2025-03-30 20:14:21 -0700 (#5592)
REVERT: a34fcdc48 [ci skip] Response to question by gh-henryiii (pybind/pybind11#5580 (comment)) (#5591)
REVERT: 8726ed22d Fix build failure when `shared_ptr<T>` points to `private` `std::enable_shared_from_this` base (#5590)
REVERT: e7e5d6e5b Make wrapped C++ functions pickleable (#5580)
REVERT: 8f00d1eea fix: set __file__ on submodules (#5584)
REVERT: c1cd022f1 tests: Add test for `boost::histogram::func_transform` situation. (#5582)
REVERT: f365314ec Enable Conversions Between Native Python Enum Types and C++ Enums (#5555)
REVERT: 48eb5ad9b Remove PyPy 3.8 and 3.9 testing. Make a pass through the entire repo to remove obviously obsolete workarounds for PyPy < 3.10. (#5578)
REVERT: 566894d5f Fix null pointer dereference in `attr_with_type_hint` (#5576)
REVERT: 974eba77a Change PYBIND11_MODULE to use multi-phase init (PEP 489) (#5574)
REVERT: 97022f83c TEST: test passes on PyPy macOS (#5569)
REVERT: 6412615eb Update NDArray[object] to be NDArray[numpy.object_] (#5571)
REVERT: bb504dd80 fix: FindPython by default logic error (#5561)
REVERT: 655c60d84 docs: fix incorrect name (PYBIND11_NEWPYTHON) (#5570)
REVERT: 9f08625d6 Updated py::capsule type hint to use new types.CapsuleType (#5567)
REVERT: dfe7e65b4 feat(types): Use `typing.SupportsInt` and `typing.SupportsFloat` and fix other typing based bugs. (#5540)
REVERT: 16b5abd42 chore: bump catch download to 2.13.10 (#5568)
REVERT: d28904f12 feat: FindPython by default (#5553)
REVERT: 06e8ee2e3 chore(deps): bump actions/attest-build-provenance in the actions group (#5556)
REVERT: d422fda12 chore(deps): bump jinja2 from 3.1.5 to 3.1.6 in /docs (#5554)
REVERT: e24e300c7 chore(deps): update pre-commit hooks (#5547)
REVERT: a822be20d chore(deps): bump the actions group with 2 updates (#5546)
REVERT: ded70fe60 Add pkgconf-pypi entrypoint (#5552)
REVERT: 79be5c831 test: Explicitly mark char as signed in dtype tests (#5545)
REVERT: 2943a27a1 squash-merge smart_holder branch into master (#5542)
REVERT: d8565ac73 Sync `Py_TPFLAGS_MANAGED_DICT` for PyPy3.11 across the codebase (#5537)
REVERT: 09b9f44ab add recently released pypy3.11 (#5534)
REVERT: 73825f351 Improved reference_internal documentation (#5528)
REVERT: b7c33009a Start pybind11v3: Remove all code for `PYBIND11_INTERNALS_VERSION`s `4` and `5` (#5530)
REVERT: 241524223 feat(types) Numpy.typing.NDArray (#5212)
REVERT: 34a118fd3 Add `release_gil_before_calling_cpp_dtor` annotation for `class_` (#5522)
REVERT: c316cf362 Make PYBIND11_INTERNALS_VERSION 6 the default on all platforms. (#5512)
REVERT: 31d7c870c Remove some maybe-uninitialized warnings (#5516)
REVERT: d2e7e8c68 chore(deps): update pre-commit hooks (#5513)
REVERT: ab44b307b Skip transient crash on GraalPy on OS X (#5514)
REVERT: 8862cd4e7 chore(deps): bump seanmiddleditch/gha-setup-ninja in the actions group (#5509)
REVERT: fe87568f0 PyPy 3.11 does not implement Py_TPFLAGS_MANAGED_DICT (#5508)
REVERT: 82845c3b4 chore(deps): bump actions/attest-build-provenance in the actions group (#5503)
REVERT: 924261e81 chore(cmake): Add an author warning that auto-calculated `PYTHON_MODULE_EXTENSION` may not respect `SETUPTOOLS_EXT_SUFFIX` during cross-compilation (#5495)
REVERT: c19c291b9 feat: --extension-suffix for pybind11 command (#5360)
REVERT: 167bb5f27 fix(cmake): don't strip with BUILD_TYPE None (#5392)
REVERT: 1b7aa0bb6 feat: rework of arg/return type hints to support .noconvert() (#5486)
REVERT: 15d9dae14 Fix data race when using shared variables (free threading) (#5494)
REVERT: 945e251a6 chore(deps): bump jinja2 from 3.1.4 to 3.1.5 in /docs (#5490)
REVERT: a09cf6184 chore(deps): update pre-commit hooks (#5488)
REVERT: c5ed9d4b1 Fix module type hint (#5469)
REVERT: cf020a1de feat(types) Allow setting types for attributes (#5460)
REVERT: 5b503f7ec chore(deps): bump actions/attest-build-provenance in the actions group (#5468)
REVERT: 3e419485c `PYBIND11_PLATFORM_ABI_ID` Modernization Continued (platforms other than MSVC) (#5439)
REVERT: 741d86f2e Drop Clang dev CI job (#5464)
REVERT: 3ebdc503d chore(deps): bump actions/attest-build-provenance in the actions group (#5461)
REVERT: b17555f34 chore(deps): update pre-commit hooks (#5459)
REVERT: 1d09fc830 Option for arg/return type hints and correct typing for std::filesystem::path (#5450)
REVERT: a6d1ff246 fix: make PYBIND11_WARNING_POP actually pop clang diagnostics (#5448)
REVERT: e7c9b9073 chore(deps): bump pypa/cibuildwheel in the actions group (#5451)
REVERT: 83b92ceb3 Try to fix reentrant write transient failures in tests (#5447)
REVERT: 330aae51c Remove mingw-w64-i686-python-numpy from mingw32 build (it does not seem to exist anymore). (#5445)
REVERT: f41dae31a Add dtype::normalized_num and dtype::num_of (#5429)
REVERT: b9fb3168a Add support for array_t<handle> and array_t<object> (#5427)
REVERT: 08095d9c7 Run pytest in verbose mode (#5443)
REVERT: 0ed20f26a chore(deps): bump actions/attest-build-provenance in the actions group (#5440)
REVERT: 7f94f24d6 feat(typing): allow annotate methods with `pos_only` when only have the `self` argument (#5403)
REVERT: 6d98d4d8d Add type hints for args and kwargs (#5357)
REVERT: a90e2af88 Factor out pybind11/conduit/pybind11_platform_abi_id.h (#5375)
REVERT: ec9c26817 Fix MSVC MT/MD incompatibility in PYBIND11_BUILD_ABI (#4953)
REVERT: 037310ea8 Use std::unique_ptr in pybind11_getbuffer (#5435)
REVERT: ce2f00559 Fixed data race in all_type_info in free-threading mode (#5419)
REVERT: f46f5be4f Fix incorrect link syntax in upgrade guide (#5434)
REVERT: 5c07feef2 chore(deps): update pre-commit hooks (#5432)
REVERT: bc041de0d Fix buffer protocol implementation (#5407)
REVERT: 75e48c5f9 Skip transient tests on GraalPy (#5422)
REVERT: f7e14e985 Address regression introduced in #5381 (#5396)
REVERT: 077e49fcd Export libc++ exceptions (#5390)
REVERT: f2907651f Fix #5399: iterator increment operator does not skip first item (#5400)
REVERT: af67e8739 docs/advanced A document about deadlock potential with C++ statics (#5394)
REVERT: 56e69a20a Print key in KeyError in map.__getitem__/__delitem__ (#5397)
REVERT: c4a05f934 Add support for GraalPy (#5380)
REVERT: 7e418f492 Allow subclasses of py::args and py::kwargs (#5381)
REVERT: 1f8b4a7f1 fix(cmake): `NO_EXTRAS` in `pybind11_add_module` function partially working (#5378)
REVERT: ad9fd39e1 chore(deps): bump pypa/cibuildwheel in the actions group (#5376)
REVERT: 1d9483ff7 Added exception translator specific mutex used with try_translate_exceptions (#5362)
REVERT: a7910be63 Add warn disable for GGC 12 bound checking error (#5355)
REVERT: 0cf3a0f7b ci: PyPI attestations (#5374)
REVERT: 5b7c0b04b docs: update changelog for 2.13.6 (#5372)
REVERT: ef5a9560b Enable type-safe interoperability between different independent Python/C++ bindings systems. (#5296)
REVERT: 5efc7439d chore(deps): bump the actions group with 2 updates (#5361)
REVERT: 8a801bdc3 chore(deps): update pre-commit hooks (#5350)
REVERT: aeda49ed0 Properly translate C++ exception to Python exception when creating Python buffer from wrapped object (#5324)
REVERT: 66c3774a6 Warnings wrappers to use from C++ (#5291)
REVERT: 65f4266ce Add `while True` & `top` method to FAQ. (#5340)
REVERT: 3fb16ad17 fix: using `__cpp_nontype_template_args` instead of `__cpp_nontype_template_parameter_class` (#5330)
REVERT: e8f595bb8 chore(deps): bump actions/attest-build-provenance in the actions group (#5335)
REVERT: c2291e597 docs: prepare for 2.13.5 (#5327)
REVERT: efa2b20d6 docs: clarify requirements for including pybind11 (#5326)
REVERT: 9966ad409 fix: allow -Wpedantic in C++20 mode (#5322)
REVERT: 2baf9d683 fix: `<ranges>` support for `py::tuple` and `py::list` (#5314)
REVERT: 7d85baa6a fix: never use `..` in a header include (#5321)
REVERT: a1d00916b Backport of google/pybind11clif#30034 (#5305)
REVERT: bd5951b69 docs: prepare for 2.13.4 (#5312)
REVERT: 28dbce415 feat: require CMake 3.15+ (#5304)
REVERT: d893f9723 fix: escape paths with spaces in pybind11-config (#4874)
REVERT: fc97cc41d Revert "fix: quote paths from pybind11-config (#5302)" (#5309)
REVERT: 011690618 chore: remove repetitive words (#5308)
REVERT: 0d44d720c Make stl.h `list|set|map_caster` more user friendly. (#4686)
REVERT: 4a06eca59 docs: prepare for 2.13.3
REVERT: 8d9f4d50c fix: quote paths from pybind11-config (#5302)
REVERT: 1fe92c7b3 fix: emscripten cmake issue (#5301)
REVERT: 40f2c7863 docs: prepare for 2.13.2 (#5299)
REVERT: 8d90b83b1 chore(deps): bump actions/attest-build-provenance in the actions group (#5297)
REVERT: fc59f4e6e fix(cmake): add required emscripten flags (#5298)
REVERT: 898794488 Add `type_caster_std_function_specializations` feature. (#4597)
REVERT: 20551ab3d chore(deps): update pre-commit hooks (#5288)
REVERT: 845105383 chore(deps): bump the actions group with 2 updates (#5287)
REVERT: 916778df4 fix: typo in documentation (#5284)
REVERT: 723307283 feat: remove Python 3.7 support (#5191)
REVERT: 2e260b067 clang-tidy upgrade (to version 18) (#5272)
REVERT: 8e7307f06 docs: remove outdated known limitation. (#5263)
REVERT: 6d4805ced Small cleanup/refactoring in support of PR #5213 (#5251)
REVERT: a582ca8a8 tests: run on pyodide (#4745)
REVERT: dbf848aff docs: extend `PYBIND11_MODULE` documentation, mention `mod_gil_not_used` (#5250)
REVERT: 43de8014f fix: make gil_safe_call_once thread-safe in free-threaded CPython (#5246)
REVERT: ccefee4c3 chore(deps): bump actions/attest-build-provenance in the actions group (#5243)
REVERT: 50acb81b0 chore(deps): bump certifi from 2024.2.2 to 2024.7.4 in /docs (#5226)
REVERT: bb05e0810 Use PyMutex instead of std::mutex in free-threaded build. (#5219)
REVERT: b21b04902 chore(deps): update pre-commit hooks (#5220)
REVERT: d78446cc2 chore(deps): bump actions/attest-build-provenance in the actions group (#5216)
REVERT: d805e9967 feat(types) Adds special Case for empty C++ tuple type annotation (#5214)
REVERT: 51c2aa16d Fixed a compilation error with gcc 14 (#5208)
REVERT: 08f946a43 fix: add guard for GCC <10.3 on C++20 (#5205)
REVERT: e0f9e7746 fix(cmake): remove extra = in flto assignment (#5207)
REVERT: 57287b578 docs: prepare for 2.13.1 (#5203)
REVERT: 4bd538a40 feat(types): add support for Typing.Callable Special Case (#5202)
REVERT: 2e35470cf fix: use manual padding of instance_map_shard (#5200)
REVERT: 895e65722 chore: back to work
git-subtree-dir: source/pybind11
git-subtree-split: a2e59f0e7065404b44dfe92a28aca47ba1378dc4
a2e59f0e chore: bump to 2.13.6
e445ca2b ci: PyPI attestations (#5374)
7b67d8e9 docs: update changelog for 2.13.6 (#5372)
a5fcc560 Enable type-safe interoperability between different independent Python/C++ bindings systems. (#5296)
54ab4249 chore(deps): bump the actions group with 2 updates (#5361)
36ee4674 chore(deps): update pre-commit hooks (#5350)
9e6a67d5 Properly translate C++ exception to Python exception when creating Python buffer from wrapped object (#5324)
570d323b Add `while True` & `top` method to FAQ. (#5340)
b9f85757 fix: using `__cpp_nontype_template_args` instead of `__cpp_nontype_template_parameter_class` (#5330)
0a96ff7e chore(deps): bump actions/attest-build-provenance in the actions group (#5335)
7c33cdc2 chore: prepare for 2.13.5
b3f5f2e7 docs: prepare for 2.13.5 (#5327)
a4f6627d docs: clarify requirements for including pybind11 (#5326)
0d21cadc fix: allow -Wpedantic in C++20 mode (#5322)
ff3ca786 fix: `<ranges>` support for `py::tuple` and `py::list` (#5314)
b0050f30 fix: never use `..` in a header include (#5321)
c6239a8a chore: version 2.13.4
63b0d146 docs: prepare for 2.13.4 (#5312)
973a16e9 fix: escape paths with spaces in pybind11-config (#4874)
75c11769 Revert "fix: quote paths from pybind11-config (#5302)" (#5309)
6685547e chore: remove repetitive words (#5308)
bd676436 chore: prepare for 2.13.3
7662af69 docs: prepare for 2.13.3
45eaee91 fix: quote paths from pybind11-config (#5302)
835139f5 fix: emscripten cmake issue (#5301)
07f30430 chore: prepare for 2.13.2
6d5704cd docs: prepare for 2.13.2 (#5299)
6ee574fa chore(deps): bump actions/attest-build-provenance in the actions group (#5297)
d8fcfe34 fix(cmake): add required emscripten flags (#5298)
78e26321 Add `type_caster_std_function_specializations` feature. (#4597)
44d0d9a4 chore(deps): update pre-commit hooks (#5288)
fe808a01 chore(deps): bump the actions group with 2 updates (#5287)
f9ae715d fix: typo in documentation (#5284)
042c3cfd clang-tidy upgrade (to version 18) (#5272)
667563dd docs: remove outdated known limitation. (#5263)
129934ad Small cleanup/refactoring in support of PR #5213 (#5251)
f50830ea tests: run on pyodide (#4745)
b4307453 docs: extend `PYBIND11_MODULE` documentation, mention `mod_gil_not_used` (#5250)
f3a6d414 fix: make gil_safe_call_once thread-safe in free-threaded CPython (#5246)
d699e99c chore(deps): bump actions/attest-build-provenance in the actions group (#5243)
4b2f7cd6 chore(deps): bump certifi from 2024.2.2 to 2024.7.4 in /docs (#5226)
8443d084 Use PyMutex instead of std::mutex in free-threaded build. (#5219)
41726b64 chore(deps): update pre-commit hooks (#5220)
ea10a69d chore(deps): bump actions/attest-build-provenance in the actions group (#5216)
a4dd41a1 feat(types) Adds special Case for empty C++ tuple type annotation (#5214)
639ca6a7 Fixed a compilation error with gcc 14 (#5208)
65afa13e fix: add guard for GCC <10.3 on C++20 (#5205)
3074608e fix(cmake): remove extra = in flto assignment (#5207)
941f45bc chore: prepare for 2.13.1
63020d33 docs: prepare for 2.13.1 (#5203)
dd0e4a0b feat(types): add support for Typing.Callable Special Case (#5202)
3b47b464 fix: use manual padding of instance_map_shard (#5200)
REVERT: 0db3d59f Allow multiphase modules to be re-imported (#5782)
REVERT: 780ec113 Make implicitly_convertable sub-interpreter and free-threading safe (#5777)
REVERT: 9af8adb7 Subinterpreter creation concurrency issues in 3.12 (#5779)
REVERT: 6972597c docs: show nogil in most examples (#5770)
REVERT: 33533ff3 Fix IsolatedConfig test (#5768)
REVERT: 7f5eea43 Check for __cpp_lib_remove_cvref as well (#5761)
REVERT: 49d19fef Implement binary version of make_index_sequence (#5751)
REVERT: 6aeae9c3 Fix py::trampoline_self_life_support visibility in docs (#5766)
REVERT: 316273ef fix: don't force -fvisibility=hidden on Windows (#5757)
REVERT: c4ee83c4 fix:: initialize_generic compiler warning about nullptr dereference (#5756)
REVERT: cc69a378 chore(deps): update pre-commit hooks (#5745)
REVERT: 66d394f2 docs: standardize header a bit (#5749)
REVERT: fa72aff5 [skip ci] Small `docs/release.rst` update, mainly to remove `git push --tags`. (#5748)
REVERT: 422990f8 chore: get back to work (after v3.0.0 release) (#5747)
REVERT: ed5057de chore: prepare for 3.0.0 (final) (#5746)
REVERT: 4dc4aca2 [skip ci] Explain: conduit feature only covers from-Python-to-C++ conversions (#5740)
REVERT: 03d8f487 docs: fix typo in multiple_interpreters (#5738)
REVERT: ea3e33e4 chore: prepare for 3.0.0rc4 (#5736)
REVERT: bdc56d9e chore(deps): bump urllib3 from 2.2.2 to 2.5.0 in /docs (#5735)
REVERT: cf3d1a75 feat: numpy scalars (#5726)
REVERT: c60c1499 tests: handle 3.12 and 3.13 implementations and 3.14.0b3+ (#5732)
REVERT: be507b72 ci: check latest on 3.13 (#5734)
REVERT: f2c0ab83 Fix TSan warning in sub-interpreter test (#5729)
REVERT: ad9180c1 fix: android CMake support (#5733)
REVERT: 86e82ddb Add support for `shared_ptr<const T>` in `py::init()` with `smart_holder` (#5731)
REVERT: 365d41a4 Eliminate cross-DSO RTTI reliance in `smart_holder` functionality (for platforms like macOS). (#5728)
REVERT: e2f86af2 docs: add documentation entry for warnings (#5356)
REVERT: f3bb0073 better test for const only smart ptr (#5727)
REVERT: d218b160 ci: avoid 3.13.4 on Windows (#5725)
REVERT: f8640da4 chore(deps): bump pypa/cibuildwheel from 3.0.0rc2 to 3.0 in the actions group (#5721)
REVERT: 7ed76e2d fix: add support for const-only smart pointers (#5718)
REVERT: 513d1f96 ci: check iOS update (#5717)
REVERT: ff0e381d chore(deps): bump requests from 2.32.3 to 2.32.4 in /docs (#5720)
REVERT: 6c5d25aa test: run pytest under Python devmode (#5715)
REVERT: 5d32ed76 docs: prepare for RC 3 (#5713)
REVERT: c786d34f fix: handle null `py::handle` and add tests for `py::scoped_critical_section` (#5706)
REVERT: c7026d0d fix!: modify the internals pointer-to-pointer implementation to not use `thread_local` (#5709)
REVERT: b1948914 fix: expose required symbol using clang (#5700)
REVERT: d4d2ec1a ci: avoid brownout (and removal) of windows-2019 (#5712)
REVERT: 0985052a chore(deps): update pre-commit hooks (#5711)
REVERT: 9295c4a5 fix: follow rest of pybind11 closer with PYBIND11_HAS_SUBINTERPRETER_SUPPORT (#5710)
REVERT: 7da1d53d ci: test on iOS (#5705)
REVERT: c2b32b1e fix(types): type hints from future python versions (#5693)
REVERT: 21c9dd11 ci: drop main tests on main
REVERT: e4873e8f fix: allow subinterp support to be disabled
REVERT: 33fb5333 fix: C++20 in Windows
REVERT: bc557a9b tests: add PYBIND11_TEST_SMART_HOLDER to tests
REVERT: 29979761 ci: rename cibw workflow file
REVERT: 7e672ca1 tests: support C++23 in tests
REVERT: ef2ad42d ci: list all jobs explicitly
REVERT: 5dff3354 ci: reduce runs on draft PRs
REVERT: df595b16 docs: changelog update for 3.0.0rc2
REVERT: a1b19722 chore: prepare for 3.0.0rc2 (#5698)
REVERT: a18b1bc4 tests: always disable on the nogil build (#5701)
REVERT: 57e27c1f tests: skip some flaky gil tests on nogil (#5699)
REVERT: 1c10d5e9 fix: prepare for 3.14 beta 2 (#5697)
REVERT: 6e3e8515 fix(cmake): regression in include gaurd (#5691)
REVERT: 03b4a9e5 fix: don't destruct module objects in atexit (#5688)
REVERT: 1dd85ef4 chore: bump maximum clang tested to 20 (#5692)
REVERT: 9d066265 docs: more warnings about locking and the GIL (#5689)
REVERT: d7769de5 feat: scoped_critical_section (#5684)
REVERT: e3883dd5 refactor: use CPython macros to construct `PYBIND11_VERSION_HEX` (#5683)
REVERT: e4622cbd chore(cmake): add compile commands to preset (#5685)
REVERT: 98bd78f0 chore: rename macro `PYBIND11_SUBINTERPRETER_SUPPORT` -> `PYBIND11_HAS_SUBINTERPRETER_SUPPORT` to meet naming convention (#5682)
REVERT: 8d503e30 docs: update contributing/release guide a little (#5681)
REVERT: 2624d4a3 tests: expect free-threaded import warnings (#5680)
REVERT: fc888f75 docs: prepare for 3.0.0rc1 (#5679)
REVERT: e8f16e2f docs: remove setup.py mentions, mention presets (#5677)
REVERT: 07d028f2 feat: Embeded sub-interpreters (#5666)
REVERT: ec8b0508 chore: convert changelog to markdown (#5672)
REVERT: e6256684 fix(cmake): error wasn't triggering (#5676)
REVERT: 7319402a chore: show preview on docs changes (#5673)
REVERT: 3867c5f5 ci: add nightlies for scientific-python (#5675)
REVERT: 9e6fe464 chore: consolidate common code in PYBIND11_MODULE and PYBIND11_EMBEDDED_MODULE (#5670)
REVERT: 67424358 fix(types): add typing and collections.abc module prefix (#5663)
REVERT: 4587d33c docs: prepare for v3.0.0rc1 (#5589)
REVERT: cc86e8b2 fix(cmake): better --fresh support (#5668)
REVERT: 6bf25d1e feat: add semi-public API: `pybind11::detail::is_holder_constructed` (#5669)
REVERT: 9afc9c4f feat: change PYBIND11_EMBEDDED_MODULE to multiphase init (#5665)
REVERT: 094343c7 fix: support Python 3.14 (#5646)
REVERT: 1107c093 docs: Add documentation for mod_gil_not_used and multiple_interpreters (#5659)
REVERT: af231a60 chore: use scikit-build-core for the build (#5598)
REVERT: 6aa3b335 fix(types): Buffer type hint (#5662)
REVERT: 95e8f89b Support for sub-interpreters (#5564)
REVERT: 05a6a03e chore(cmake): add CMake presets (#5655)
REVERT: 853bafa0 fix: use original dict (#5658)
REVERT: c5dc6f9f ci: bump default versions (#5657)
REVERT: 74b52427 feat: add `py::potentially_slicing_weak_ptr(handle)` function (#5624)
REVERT: ce42c4df fix(cmake): avoid message if FINDPYTHON NEW (#5656)
REVERT: d7d782c5 fix(regression): support embedded submodule (#5650)
REVERT: 9a191c24 Fix typos for FindPython compact mode: `Python_LIRAR{Y,IES}` -> `Python_LIBRAR{Y,IES}` (#5653)
REVERT: c125cc78 Collect all `#define PYBIND11_HAS_...` in pybind11/detail/common.h (#5647)
REVERT: 002c05b1 fix: handle MSVC warning C4866: compiler may not enforce left-to-right evaluation order (#5641)
REVERT: a265a4cf fix: define _DEBUG macro to 1 on redefinition (#5639)
REVERT: 099583c5 chore(deps): update pre-commit hooks (#5642)
REVERT: c630e22c Add `static_assert`s to enforce that `py::smart_holder` is combined with `py::trampoline_self_life_support` (#5633)
REVERT: c7f3460f Fix gcc compiler warnings (#5523)
REVERT: d3fee429 chore(deps): bump astral-sh/setup-uv from 5 to 6 in the actions group (#5632)
REVERT: bc4a66df fix: provide useful behavior of default `py::slice` (#5620)
REVERT: 5c498583 fix: upgrade 20.04 runners to 22.04 (fix for ICC, NVHPC) (#5621)
REVERT: 223e2e9d Fix missing pythonic type hints for native_enum (#5619)
REVERT: 3c586340 Add class doc string to native_enum (#5617)
REVERT: b3bb31ca ci: work on speeding up further (#5613)
REVERT: cbcc2385 Factor out pybind11/gil_simple.h (#5614)
REVERT: ee04df0d Updated STL casters and py::buffer to use collections.abc (#5566)
REVERT: f3c19138 Remove obsolete `"E501"` line in pyproject.toml (#5539)
REVERT: 662a88cb ci: speed up ci a bit by thinning out matrix (#5602)
REVERT: a2951abb chore(deps): update pre-commit hooks (#5605)
REVERT: d25e91fb fix(cmake): warning about missing file (#5612)
REVERT: 31e52b2c Add holder caster traits tests in test_smart_ptr.cpp,py (#5603)
REVERT: e38beb96 [skip ci] Move "Pitfalls with raw pointers and shared ownership" section to a more prominent location. (#5611)
REVERT: 1bd1d1ce Change `PyCFunction` cast in function_record_pyobject.h to sidestep unhelpful compiler warnings. (#5608)
REVERT: 708ce4d9 Fix GraalPy version parsing on dev builds (#5609)
REVERT: a28ea8cc Eliminate `pybindit` namespace (#5607)
REVERT: 6d1f28fe feat: remove make_simple_namespace (#5597)
REVERT: 73ad3099 fix: fully deprecate get_type_of (deprecated in 2.6 but no warning (#5596)
REVERT: b70b8eb3 chore: require pytest 6 consistently (#5599)
REVERT: fdab860a feat: drop PYBIND11_NUMPY_1_ONLY (#5595)
REVERT: 55b1357d chore: update nox and test deps (#5594)
REVERT: 8ef10a0e ci: update to GraalPy 24.2 and mention in README (#5586)
REVERT: d27fdaa2 chore: update for CMake 4.0 (#5593)
REVERT: e03ec306 Squashed function_record_std_launder/manuscript — 57b9a0af815d19b236b74be06a172bc5c9956618 — 2025-03-30 20:14:21 -0700 (#5592)
REVERT: a34fcdc4 [ci skip] Response to question by gh-henryiii (pybind/pybind11#5580 (comment)) (#5591)
REVERT: 8726ed22 Fix build failure when `shared_ptr<T>` points to `private` `std::enable_shared_from_this` base (#5590)
REVERT: e7e5d6e5 Make wrapped C++ functions pickleable (#5580)
REVERT: 8f00d1ee fix: set __file__ on submodules (#5584)
REVERT: c1cd022f tests: Add test for `boost::histogram::func_transform` situation. (#5582)
REVERT: f365314e Enable Conversions Between Native Python Enum Types and C++ Enums (#5555)
REVERT: 48eb5ad9 Remove PyPy 3.8 and 3.9 testing. Make a pass through the entire repo to remove obviously obsolete workarounds for PyPy < 3.10. (#5578)
REVERT: 566894d5 Fix null pointer dereference in `attr_with_type_hint` (#5576)
REVERT: 974eba77 Change PYBIND11_MODULE to use multi-phase init (PEP 489) (#5574)
REVERT: 97022f83 TEST: test passes on PyPy macOS (#5569)
REVERT: 6412615e Update NDArray[object] to be NDArray[numpy.object_] (#5571)
REVERT: bb504dd8 fix: FindPython by default logic error (#5561)
REVERT: 655c60d8 docs: fix incorrect name (PYBIND11_NEWPYTHON) (#5570)
REVERT: 9f08625d Updated py::capsule type hint to use new types.CapsuleType (#5567)
REVERT: dfe7e65b feat(types): Use `typing.SupportsInt` and `typing.SupportsFloat` and fix other typing based bugs. (#5540)
REVERT: 16b5abd4 chore: bump catch download to 2.13.10 (#5568)
REVERT: d28904f1 feat: FindPython by default (#5553)
REVERT: 06e8ee2e chore(deps): bump actions/attest-build-provenance in the actions group (#5556)
REVERT: d422fda1 chore(deps): bump jinja2 from 3.1.5 to 3.1.6 in /docs (#5554)
REVERT: e24e300c chore(deps): update pre-commit hooks (#5547)
REVERT: a822be20 chore(deps): bump the actions group with 2 updates (#5546)
REVERT: ded70fe6 Add pkgconf-pypi entrypoint (#5552)
REVERT: 79be5c83 test: Explicitly mark char as signed in dtype tests (#5545)
REVERT: 2943a27a squash-merge smart_holder branch into master (#5542)
REVERT: d8565ac7 Sync `Py_TPFLAGS_MANAGED_DICT` for PyPy3.11 across the codebase (#5537)
REVERT: 09b9f44a add recently released pypy3.11 (#5534)
REVERT: 73825f35 Improved reference_internal documentation (#5528)
REVERT: b7c33009 Start pybind11v3: Remove all code for `PYBIND11_INTERNALS_VERSION`s `4` and `5` (#5530)
REVERT: 24152422 feat(types) Numpy.typing.NDArray (#5212)
REVERT: 34a118fd Add `release_gil_before_calling_cpp_dtor` annotation for `class_` (#5522)
REVERT: c316cf36 Make PYBIND11_INTERNALS_VERSION 6 the default on all platforms. (#5512)
REVERT: 31d7c870 Remove some maybe-uninitialized warnings (#5516)
REVERT: d2e7e8c6 chore(deps): update pre-commit hooks (#5513)
REVERT: ab44b307 Skip transient crash on GraalPy on OS X (#5514)
REVERT: 8862cd4e chore(deps): bump seanmiddleditch/gha-setup-ninja in the actions group (#5509)
REVERT: fe87568f PyPy 3.11 does not implement Py_TPFLAGS_MANAGED_DICT (#5508)
REVERT: 82845c3b chore(deps): bump actions/attest-build-provenance in the actions group (#5503)
REVERT: 924261e8 chore(cmake): Add an author warning that auto-calculated `PYTHON_MODULE_EXTENSION` may not respect `SETUPTOOLS_EXT_SUFFIX` during cross-compilation (#5495)
REVERT: c19c291b feat: --extension-suffix for pybind11 command (#5360)
REVERT: 167bb5f2 fix(cmake): don't strip with BUILD_TYPE None (#5392)
REVERT: 1b7aa0bb feat: rework of arg/return type hints to support .noconvert() (#5486)
REVERT: 15d9dae1 Fix data race when using shared variables (free threading) (#5494)
REVERT: 945e251a chore(deps): bump jinja2 from 3.1.4 to 3.1.5 in /docs (#5490)
REVERT: a09cf618 chore(deps): update pre-commit hooks (#5488)
REVERT: c5ed9d4b Fix module type hint (#5469)
REVERT: cf020a1d feat(types) Allow setting types for attributes (#5460)
REVERT: 5b503f7e chore(deps): bump actions/attest-build-provenance in the actions group (#5468)
REVERT: 3e419485 `PYBIND11_PLATFORM_ABI_ID` Modernization Continued (platforms other than MSVC) (#5439)
REVERT: 741d86f2 Drop Clang dev CI job (#5464)
REVERT: 3ebdc503 chore(deps): bump actions/attest-build-provenance in the actions group (#5461)
REVERT: b17555f3 chore(deps): update pre-commit hooks (#5459)
REVERT: 1d09fc83 Option for arg/return type hints and correct typing for std::filesystem::path (#5450)
REVERT: a6d1ff24 fix: make PYBIND11_WARNING_POP actually pop clang diagnostics (#5448)
REVERT: e7c9b907 chore(deps): bump pypa/cibuildwheel in the actions group (#5451)
REVERT: 83b92ceb Try to fix reentrant write transient failures in tests (#5447)
REVERT: 330aae51 Remove mingw-w64-i686-python-numpy from mingw32 build (it does not seem to exist anymore). (#5445)
REVERT: f41dae31 Add dtype::normalized_num and dtype::num_of (#5429)
REVERT: b9fb3168 Add support for array_t<handle> and array_t<object> (#5427)
REVERT: 08095d9c Run pytest in verbose mode (#5443)
REVERT: 0ed20f26 chore(deps): bump actions/attest-build-provenance in the actions group (#5440)
REVERT: 7f94f24d feat(typing): allow annotate methods with `pos_only` when only have the `self` argument (#5403)
REVERT: 6d98d4d8 Add type hints for args and kwargs (#5357)
REVERT: a90e2af8 Factor out pybind11/conduit/pybind11_platform_abi_id.h (#5375)
REVERT: ec9c2681 Fix MSVC MT/MD incompatibility in PYBIND11_BUILD_ABI (#4953)
REVERT: 037310ea Use std::unique_ptr in pybind11_getbuffer (#5435)
REVERT: ce2f0055 Fixed data race in all_type_info in free-threading mode (#5419)
REVERT: f46f5be4 Fix incorrect link syntax in upgrade guide (#5434)
REVERT: 5c07feef chore(deps): update pre-commit hooks (#5432)
REVERT: bc041de0 Fix buffer protocol implementation (#5407)
REVERT: 75e48c5f Skip transient tests on GraalPy (#5422)
REVERT: f7e14e98 Address regression introduced in #5381 (#5396)
REVERT: 077e49fc Export libc++ exceptions (#5390)
REVERT: f2907651 Fix #5399: iterator increment operator does not skip first item (#5400)
REVERT: af67e873 docs/advanced A document about deadlock potential with C++ statics (#5394)
REVERT: 56e69a20 Print key in KeyError in map.__getitem__/__delitem__ (#5397)
REVERT: c4a05f93 Add support for GraalPy (#5380)
REVERT: 7e418f49 Allow subclasses of py::args and py::kwargs (#5381)
REVERT: 1f8b4a7f fix(cmake): `NO_EXTRAS` in `pybind11_add_module` function partially working (#5378)
REVERT: ad9fd39e chore(deps): bump pypa/cibuildwheel in the actions group (#5376)
REVERT: 1d9483ff Added exception translator specific mutex used with try_translate_exceptions (#5362)
REVERT: a7910be6 Add warn disable for GGC 12 bound checking error (#5355)
REVERT: 0cf3a0f7 ci: PyPI attestations (#5374)
REVERT: 5b7c0b04 docs: update changelog for 2.13.6 (#5372)
REVERT: ef5a9560 Enable type-safe interoperability between different independent Python/C++ bindings systems. (#5296)
REVERT: 5efc7439 chore(deps): bump the actions group with 2 updates (#5361)
REVERT: 8a801bdc chore(deps): update pre-commit hooks (#5350)
REVERT: aeda49ed Properly translate C++ exception to Python exception when creating Python buffer from wrapped object (#5324)
REVERT: 66c3774a Warnings wrappers to use from C++ (#5291)
REVERT: 65f4266c Add `while True` & `top` method to FAQ. (#5340)
REVERT: 3fb16ad1 fix: using `__cpp_nontype_template_args` instead of `__cpp_nontype_template_parameter_class` (#5330)
REVERT: e8f595bb chore(deps): bump actions/attest-build-provenance in the actions group (#5335)
REVERT: c2291e59 docs: prepare for 2.13.5 (#5327)
REVERT: efa2b20d docs: clarify requirements for including pybind11 (#5326)
REVERT: 9966ad40 fix: allow -Wpedantic in C++20 mode (#5322)
REVERT: 2baf9d68 fix: `<ranges>` support for `py::tuple` and `py::list` (#5314)
REVERT: 7d85baa6 fix: never use `..` in a header include (#5321)
REVERT: a1d00916 Backport of google/pybind11clif#30034 (#5305)
REVERT: bd5951b6 docs: prepare for 2.13.4 (#5312)
REVERT: 28dbce41 feat: require CMake 3.15+ (#5304)
REVERT: d893f972 fix: escape paths with spaces in pybind11-config (#4874)
REVERT: fc97cc41 Revert "fix: quote paths from pybind11-config (#5302)" (#5309)
REVERT: 01169061 chore: remove repetitive words (#5308)
REVERT: 0d44d720 Make stl.h `list|set|map_caster` more user friendly. (#4686)
REVERT: 4a06eca5 docs: prepare for 2.13.3
REVERT: 8d9f4d50 fix: quote paths from pybind11-config (#5302)
REVERT: 1fe92c7b fix: emscripten cmake issue (#5301)
REVERT: 40f2c786 docs: prepare for 2.13.2 (#5299)
REVERT: 8d90b83b chore(deps): bump actions/attest-build-provenance in the actions group (#5297)
REVERT: fc59f4e6 fix(cmake): add required emscripten flags (#5298)
REVERT: 89879448 Add `type_caster_std_function_specializations` feature. (#4597)
REVERT: 20551ab3 chore(deps): update pre-commit hooks (#5288)
REVERT: 84510538 chore(deps): bump the actions group with 2 updates (#5287)
REVERT: 916778df fix: typo in documentation (#5284)
REVERT: 72330728 feat: remove Python 3.7 support (#5191)
REVERT: 2e260b06 clang-tidy upgrade (to version 18) (#5272)
REVERT: 8e7307f0 docs: remove outdated known limitation. (#5263)
REVERT: 6d4805ce Small cleanup/refactoring in support of PR #5213 (#5251)
REVERT: a582ca8a tests: run on pyodide (#4745)
REVERT: dbf848af docs: extend `PYBIND11_MODULE` documentation, mention `mod_gil_not_used` (#5250)
REVERT: 43de8014 fix: make gil_safe_call_once thread-safe in free-threaded CPython (#5246)
REVERT: ccefee4c chore(deps): bump actions/attest-build-provenance in the actions group (#5243)
REVERT: 50acb81b chore(deps): bump certifi from 2024.2.2 to 2024.7.4 in /docs (#5226)
REVERT: bb05e081 Use PyMutex instead of std::mutex in free-threaded build. (#5219)
REVERT: b21b0490 chore(deps): update pre-commit hooks (#5220)
REVERT: d78446cc chore(deps): bump actions/attest-build-provenance in the actions group (#5216)
REVERT: d805e996 feat(types) Adds special Case for empty C++ tuple type annotation (#5214)
REVERT: 51c2aa16 Fixed a compilation error with gcc 14 (#5208)
REVERT: 08f946a4 fix: add guard for GCC <10.3 on C++20 (#5205)
REVERT: e0f9e774 fix(cmake): remove extra = in flto assignment (#5207)
REVERT: 57287b57 docs: prepare for 2.13.1 (#5203)
REVERT: 4bd538a4 feat(types): add support for Typing.Callable Special Case (#5202)
REVERT: 2e35470c fix: use manual padding of instance_map_shard (#5200)
REVERT: 895e6572 chore: back to work
git-subtree-dir: source/pybind11
git-subtree-split: a2e59f0e7065404b44dfe92a28aca47ba1378dc4
97bf890db chore: prepare 3.1.0 release (#6125)
05f6e6f68 fix(subinterpreter): don't touch the thread state before create() attaches one (#6127)
6dd1756f9 chore(deps): update pre-commit hooks (#6126)
59565095f Delegate py::print to Python's native print (#6121)
63d627c57 feat!: drop support for Python 3.8, MSVC 2017 (#6110)
695a7a421 chore(deps): bump the actions group with 3 updates (#6119)
ea9e6e6a2 feat: small command line helpers for quick tests (#4272)
652c69437 fix: add py::mod_gil_used() spelling, support pedantic tests (#5797)
2f85cc8c4 chore(ci): bump NVHPC to 26.5 (#6117)
5540f9680 fix: only add string_view life support for transient sources (#6096)
a647cddd4 fix(cmake): respect explicit PYBIND11_USE_CROSSCOMPILING under CMP0190 (#6094)
95ebcb364 chore(tools): make_changelog missed and resurrected PRs (#6108)
f4d31b743 fix(cmake): don't pass -fno-fat-lto-objects on Apple GCC (#6114)
f95b7a586 fix: include `complex` in std::complex input annotation (#6113)
17b3b605a test: remove dead PR3068 workaround branch (#6109)
57e7a8de3 fix(stl_bind): correct __delitem__ for negative-step slices and re-enable contiguous erase fast path (#6088)
36341ba9b ci: test Python 3.15 (#6107)
fb836a2f1 ci: drop near-duplicate jobs (#6106)
85198b598 fix(ci): use the intended Python interpreter for CMake discovery (#6105)
7478df942 fix(cmake): unset stale PYTHON_MODULE_DEBUG_POSTFIX and correct USE_PYTHON_INCLUDE_DIR variable (#6086)
34566e1d2 chore(deps): bump soupsieve from 2.5 to 2.8.4 in /docs (#6100)
28b98f2d3 ci: update cibuildwheel to v4.1 and pyodide to 314 (#6095)
7ca651c0e chore(deps): update pre-commit hooks (#6099)
b57b4393f chore(deps): bump the actions group with 3 updates (#6098)
db92ad940 revert: "add life support to handles cast to string_view (#6092)" (#6097)
84da0e254 refactor: remove needless load_src alias in string_caster (#6093)
3de040247 chore: add agent files (#6082)
085b66068 fix: data race on last_storage_ptr_ cache in gil_safe_call_once_and_store (#6087)
59d7cb28c fix: add life support to handles cast to string_view (#6092)
da3bdcad0 chore(setup_helpers): remove dead cpp_flag_cache and fix parameter typo (#6085)
99117da02 chore(eval): drop Python 2 coding cookie prepended to evaluated source (#6089)
f00aa6fe0 ci: drop boost from 32-bit mingw32 install (#6091)
ff1a35cb8 ci: update GraalPy from 24.2 to 25.0 (Python 3.12 based) (#6083)
ec1d8762a chore(deps): update pre-commit hooks (#6079)
6079989cf Pypy testing no longer xfails (#6077)
46ebf5031 feat(subinterpreter): reusable PyThreadState via subinterpreter_thread_state (#6073)
f891299e6 Fix custom __str__ for enum_ (#6078)
a2592ad9d Apply -undefined dynamic_lookup to all Apple platforms (#6075)
5205df97f chore(deps): bump idna from 3.7 to 3.15 in /docs (#6074)
28bbda9dd [skip ci] test: reject shared_ptr casts for custom holders (#6069)
3160c8239 ci: pin Ubuntu PyPy 3.11 to 7.3.21 (#6070)
5a5f21deb fix: Invert input/output context if a Python function is called from C++ (#6055)
00a9c6244 chore(deps): update pre-commit hooks (#6054)
59a917db6 chore(deps): bump urllib3 from 2.6.3 to 2.7.0 in /docs (#6058)
81817aed7 ci: remove the deadsnakes job (#6052)
9cc298a48 ci: pass explicit ARM64 Python artifacts on windows-11-arm (#6051)
c5b3ae816 ci: pin PyPy 3.11 to 7.3.21 on macOS and Windows (#6050)
ee1d83f6c chore(deps): bump the actions group with 2 updates (#6047)
0f8396e4f [skip ci] ci: schedule recurring CI and CIBW runs (#6048)
d4336108d [ci] Drop GitHub Action seanmiddleditch/gha-setup-ninja (#6044)
678b6735e build: support Eigen 5 (#6036)
ae05b1556 [skip ci] docs: add v3.0.4 changelog updates. (#6041)
7029f99cc fix: segfault when moving `scoped_ostream_redirect` (#6033)
288913638 ci: bump setup-uv to maintained tag scheme (#6035)
0db7f72dc Handle result from PyObject_VisitManagedDict (#6032)
4158dcfe7 chore(deps): update pre-commit hooks (#6029)
98e50b702 fix: avoid copy constructor instantiation in shared_ptr fallback cast (#6028)
bfd6cbda2 chore(deps): bump the actions group with 2 updates (#6027)
d2413f5bc docs: add v3.0.3 and v3.1.0 changelog updates. (#6023)
50930ae76 chore(deps): bump pygments from 2.17.2 to 2.20.0 in /docs (#6024)
609d2c812 Fix heap-buffer-overflow in `pythonbuf` with undersized buffers (#6019)
83f71d8b8 fix: detect virtual inheritance in add_base to prevent pointer offset crash (#6017)
524d72b36 fix: strdup `"self"` arg in `def_property_static`, partially revert #6010 (gh-5976) (#6015)
e8cead162 Harden `PYBIND11_MODULE_PYINIT` and `get_internals()` against crashes during module init (#6018)
70b6fd30f Fix TSS key exhaustion in implicitly_convertible() (gh-5975) (#6020)
3b6242610 Fix `static_pointer_cast` build failure with virtual inheritance in `holder_caster_foreign_helpers.h` (#6014)
c0bbd8b70 fix: bind noexcept and ref-qualified methods from unregistered base classes (#5992)
e4fbc0570 chore(deps): bump requests from 2.32.4 to 2.33.0 in /docs (#6013)
ce9f83c70 Fix crash in def_readwrite for non-smart-holder properties of smart-holder classes (v2) (#6008)
2d1723c0d Resolve ambiguous factory spec. with nvcc+GCC (#6011)
dd95d53f0 Fix memory leak: clear managed dict in pybind11_object_dealloc on Python 3.13+ (#5999)
0a45af253 gh-5991: Fix segfault during finalization related to function_record (#6010)
1c72409f7 chore: some minor CPython API cleanup (#6005)
4d51aefc2 chore(deps): update pre-commit hooks (#6002)
cd538ed11 Re-enable Android tests in CIBW workflow (#6001)
9d8c57fee chore(deps): bump the actions group with 3 updates (#6000)
4a77b9772 Move tomlkit dependency to dev group (#5990)
1a863647c [ci skip] fix(tests): make async callback test deterministic (#5986)
ac286c932 internals: optimize std::unordered_map internals with noexcept (#5960)
ccb7129f5 Improve performance of enum_ operators by going back to specific implementation (#5887)
e8e8d6ab2 Expand float and complex strict mode to allow ints and ints/float (for PEP 484 compatibility). (#5879)
2448bc585 [skip ci] Bump version to v3.1.0a0 (#5987)
45fab4087 Update version number to v3.0.2 (final) and set release date in changelog.md to February 16, 2026 (#5985)
44a0cd241 [ci skip] docs/changelog.md updates for 3.0.2, to account for 5 additional PRs (#5984)
3ae5a173c Add fallback implementation of `PyCriticalSection_BeginMutex` for Python 3.13t (#5981)
5f2c67891 Add helpers to array that return the size and strides as a std::span (#5974)
8f68ecd32 chore(deps): update pre-commit hooks (#5982)
4d7d02a8e Fix race condition with py::make_key_iterator in free threading (#5971)
e7754de03 Revert internals destruction and add test for internals recreation (#5972)
0080cae38 chore(deps): bump jwlawson/actions-setup-cmake in the actions group (#5978)
95d4af7ff Fix CI issue: numpy requirement for Python 3.14 on ARM64 Windows (#5977)
4f81a1250 Fix deadlock in test with free threading (#5973)
6c836071a Changelog updates (#5967)
5a6edc999 Exclude MSVC up to 19.16 from using std::launder (#5968)
53ccc32f8 fix: cross-compilation updates (#5829)
a8e223d0c Directly check if/which interpreter is active before doing CLEAR in destructor (#5965)
da6e07108 Destruct internals during interpreter finalization (#5958)
e44aae226 chore: bump CMake max policy to 4.2 (#5944)
ca1d99646 chore(deps): bump urllib3 from 2.6.0 to 2.6.3 in /docs (#5954)
cc551ada3 Appease MSVC Warning C4866: compiler may not enforce left-to-right evaluation order (#5955)
d36f5dd5a Appease MSVC Warning C4866: compiler may not enforce left-to-right evaluation order (#5953)
745e5688e Fix longdouble complex docstring to clongdouble (#5952)
10f870897 Change function calls to use vectorcall (#5948)
c761608a2 chore(deps): update pre-commit hooks (#5951)
2c9191e9d chore(deps): bump egor-tensin/setup-clang in the actions group (#5950)
b93c0f7ed Fix ambiguous `str(handle)` constructor for object-derived types (#5949)
fee2527df Fix concurrency consistency for `internals_pp_manager` under multiple-interpreters (#5947)
0057e4945 Add per-interpreter storage for `gil_safe_call_once_and_store` (#5933)
799f591ec Re-enable Move Subinterpreter test for free-threaded Python 3.14 (#5940)
7ae61bfb8 Avoid LNK2001 in c++20 when /GL (Whole program optimization) is on with MSVC Update pybind11.h (#5939)
78381e5e2 Improve C++ test infrastructure: progress reporter, timeouts, and skip hanging Move Subinterpreter test (#5942)
3aeb113b0 chore(deps): bump the actions group across 1 directory with 5 updates (#5941)
d4f9cfbc2 Modernize NVHPC CI job (to make it working again): Ubuntu-24.04 runner, NVHPC 25.11 (#5935)
5b379161a Apply clang-tidy fixes to subinterpreter support code (#5929)
100693341 chore: also use typos (#5931)
41a4d0c4b Add Windows arm tests (#5932)
032e73d56 Replace C-style casts to static_cast and reinterpret_cast (#5930)
228f56361 Skip cross module exception translation on FreeBSD (#5925)
3ebbecb8a Add more readability tidy rules (#5924)
665153096 Enforce more ruff rules (#5922)
1c1d01c8a Use well-known labels in `project.urls` (#5921)
1dc76208d chore(deps): bump urllib3 from 2.5.0 to 2.6.0 in /docs (#5920)
d810d4f03 chore(deps): update pre-commit hooks (#5918)
55e4bb913 Work around GCC -Warray-bounds false positive in argument_vector (#5908)
734c29b25 Point main README.rst to CI for supported platforms and compilers (#5910)
ab9ac90fc Replace deprecated macos-13 runners with macos-15-intel (#5916)
28ecc9b6a Disable Android cibuildwheel tests only on `ubuntu-latest` (#5915)
1fa9fad6d chore(deps): bump the actions group with 5 updates (#5912)
665461d06 Remove enum from bold in doc (#5903)
af796d0a9 Don't allow keep_alive or call_guard on properties (#5533)
42cda7570 Fix `*args/**kwargs` return types. Add type hinting to `py::make_tuple` (#5881)
8ecf10e8c Fix crash in `gil_scoped_acquire` (#5828)
b30e72c6f Replace env.deprecated_call() with pytest.deprecated_call() (#5893)
3370fe14b Enhance: edit doc py::native_enum feature in upgrade.rst (#5885)
1ccaad5b1 chore: log_level is better than log_cli_level (#5890)
9f1187f97 Add `typing.SupportsIndex` to `int`/`float`/`complex` type hints (#5891)
73da78c3e chore(deps): update pre-commit hooks (#5888)
e6984c805 native_enum: add capsule containing enum information and cleanup logic (#5871)
15943963b fix dangling thread state issue (#5870)
1e5bc66e3 Factor out readable function signatures to avoid duplication (#5857)
cc36ac51a type_caster_generic: fix compiler error when casting a T that is implicitly convertible from T* (#5873)
a2c59711b type_caster_generic: add cast_sources abstraction (#5866)
fc423c948 Fix dangling pointer in internals::registered_types_cpp_fast from #5842 (#5867)
c7b4f66a7 type_caster_generic: add set_foreign_holder method for subclasses to implement (#5862)
9f7520219 Fix thread-safety in `get_local_type_info()` (#5856)
aa4259b4f chore(deps): update pre-commit hooks (#5820)
1cf0948d3 Avoid a heap allocation on every legacy py::enum_ load (#5860)
cae4ae083 docs: clarify to what extent bindings are actually global (#5859)
326200019 Add fast_type_map, use it authoritatively for local types and as a hint for global types (ABI breaking) (#5842)
9ea197627 Use new 3.14 C APIs when available (#5854)
4dc33d652 Fix `smart_holder` multiple/virtual inheritance bugs in `shared_ptr` and `unique_ptr` to-Python conversions (#5836)
0161da9d6 [skip ci] .gitignore: exclude __pycache__ directories (#5838)
81ffb1d5c Add 90 minute limit for tests (#5851)
8ed0dab67 Add float type caster and revert type hint changes to int_ and float_ (#5839)
30748f863 Avoid heap allocation for function calls with a small number of args (#5824)
326b10637 Use thread_local instead of thread_specific_storage for internals (#5834)
d4d555d9e Restore `runs-on: windows-latest` (#5835)
937552f0a Use thread_local for loader_life_support to improve performance (#5830)
68cbae664 tests: add or delete copy/move ctors where needed to make type traits match reality (#5833)
a6581eee8 pytypes.h: constrain accessor::operator= templates so that they do not obscure special members (#5832)
7fb54e306 chore(deps): bump the actions group with 3 updates (#5831)
852a4b501 s/windows-2022/windows-latest/ in .github/workflows/{ci,pip}.yml (#5826)
ef0f1ff5f chore(deps): bump the actions group across 1 directory with 2 updates (#5818)
bf2d56e8a Fix the first example in the first steps guide not compiling (#5823)
cd56888c8 Bring CI back to all-working condition (#5822)
3878c23f8 Fix typo in error message (#5817)
3c0ee8971 Fix compiler detection with clang-cl (#5816)
6e0d1c240 chore: back to work
f5fbe867d chore: bump to 3.0.1 (#5810)
cddec2bb1 fix: limit warning issue (#5807)
e71489c31 tests: avoid false DOWNLOAD_CATCH manually-specified variables warning (#5803)
8bbc3091c Improve buffer_info type checking in numpy docs (#5805)
03607757f correct homebrew package URL in installing.rst (#5808)
adb5603f6 chore: rename generic slots variable (#5793)
7aa3780dd Replace robotpy-build with semiwrap (#5804)
ce7122857 ci: avoid macOS 15 image change for iOS (#5798)
c1bf55a21 Fix subinterpreter exception handling SEGFAULT (#5795)
90bc05c7a chore(deps): bump actions/download-artifact (#5792)
580494c7b fix: LTO warning of gcc >= 11.4 (#5791)
6292b704f Explain linting suppressions (#5790)
94c825081 inline get_interpreter_state_uncheccked inline function (#5789)
23c59b6e3 ci: add android test (#5714)
a5665e3ac fix: type_caster_enum_type for pointer types (#5694) (#5776)
9360553f8 chore(deps): update pre-commit hooks (#5785)
c5e8fec92 Make function record subinterpreter safe (#5771)
0db3d59fd Allow multiphase modules to be re-imported (#5782)
780ec1136 Make implicitly_convertable sub-interpreter and free-threading safe (#5777)
9af8adb71 Subinterpreter creation concurrency issues in 3.12 (#5779)
6972597c9 docs: show nogil in most examples (#5770)
33533ff3f Fix IsolatedConfig test (#5768)
7f5eea432 Check for __cpp_lib_remove_cvref as well (#5761)
49d19fef6 Implement binary version of make_index_sequence (#5751)
6aeae9c31 Fix py::trampoline_self_life_support visibility in docs (#5766)
316273efc fix: don't force -fvisibility=hidden on Windows (#5757)
c4ee83c49 fix:: initialize_generic compiler warning about nullptr dereference (#5756)
cc69a3789 chore(deps): update pre-commit hooks (#5745)
66d394f25 docs: standardize header a bit (#5749)
fa72aff53 [skip ci] Small `docs/release.rst` update, mainly to remove `git push --tags`. (#5748)
422990f84 chore: get back to work (after v3.0.0 release) (#5747)
ed5057ded chore: prepare for 3.0.0 (final) (#5746)
4dc4aca2e [skip ci] Explain: conduit feature only covers from-Python-to-C++ conversions (#5740)
03d8f4875 docs: fix typo in multiple_interpreters (#5738)
ea3e33e40 chore: prepare for 3.0.0rc4 (#5736)
bdc56d9e2 chore(deps): bump urllib3 from 2.2.2 to 2.5.0 in /docs (#5735)
cf3d1a75a feat: numpy scalars (#5726)
c60c14991 tests: handle 3.12 and 3.13 implementations and 3.14.0b3+ (#5732)
be507b725 ci: check latest on 3.13 (#5734)
f2c0ab83b Fix TSan warning in sub-interpreter test (#5729)
ad9180c12 fix: android CMake support (#5733)
86e82ddbc Add support for `shared_ptr<const T>` in `py::init()` with `smart_holder` (#5731)
365d41a4b Eliminate cross-DSO RTTI reliance in `smart_holder` functionality (for platforms like macOS). (#5728)
e2f86af21 docs: add documentation entry for warnings (#5356)
f3bb00732 better test for const only smart ptr (#5727)
d218b160a ci: avoid 3.13.4 on Windows (#5725)
f8640da40 chore(deps): bump pypa/cibuildwheel from 3.0.0rc2 to 3.0 in the actions group (#5721)
7ed76e2d5 fix: add support for const-only smart pointers (#5718)
513d1f962 ci: check iOS update (#5717)
ff0e381d9 chore(deps): bump requests from 2.32.3 to 2.32.4 in /docs (#5720)
6c5d25aae test: run pytest under Python devmode (#5715)
5d32ed76c docs: prepare for RC 3 (#5713)
c786d34f6 fix: handle null `py::handle` and add tests for `py::scoped_critical_section` (#5706)
c7026d0d1 fix!: modify the internals pointer-to-pointer implementation to not use `thread_local` (#5709)
b19489145 fix: expose required symbol using clang (#5700)
d4d2ec1ad ci: avoid brownout (and removal) of windows-2019 (#5712)
0985052ad chore(deps): update pre-commit hooks (#5711)
9295c4a56 fix: follow rest of pybind11 closer with PYBIND11_HAS_SUBINTERPRETER_SUPPORT (#5710)
7da1d53df ci: test on iOS (#5705)
c2b32b1e3 fix(types): type hints from future python versions (#5693)
21c9dd11b ci: drop main tests on main
e4873e8f5 fix: allow subinterp support to be disabled
33fb53335 fix: C++20 in Windows
bc557a9b5 tests: add PYBIND11_TEST_SMART_HOLDER to tests
29979761b ci: rename cibw workflow file
7e672ca10 tests: support C++23 in tests
ef2ad42d2 ci: list all jobs explicitly
5dff3354f ci: reduce runs on draft PRs
df595b165 docs: changelog update for 3.0.0rc2
a1b197224 chore: prepare for 3.0.0rc2 (#5698)
a18b1bc4d tests: always disable on the nogil build (#5701)
57e27c1ff tests: skip some flaky gil tests on nogil (#5699)
1c10d5e9b fix: prepare for 3.14 beta 2 (#5697)
6e3e8515e fix(cmake): regression in include gaurd (#5691)
03b4a9e56 fix: don't destruct module objects in atexit (#5688)
1dd85ef42 chore: bump maximum clang tested to 20 (#5692)
9d0662652 docs: more warnings about locking and the GIL (#5689)
d7769de53 feat: scoped_critical_section (#5684)
e3883dd5d refactor: use CPython macros to construct `PYBIND11_VERSION_HEX` (#5683)
e4622cbd7 chore(cmake): add compile commands to preset (#5685)
98bd78f06 chore: rename macro `PYBIND11_SUBINTERPRETER_SUPPORT` -> `PYBIND11_HAS_SUBINTERPRETER_SUPPORT` to meet naming convention (#5682)
8d503e30b docs: update contributing/release guide a little (#5681)
2624d4a36 tests: expect free-threaded import warnings (#5680)
fc888f758 docs: prepare for 3.0.0rc1 (#5679)
e8f16e2fd docs: remove setup.py mentions, mention presets (#5677)
07d028f21 feat: Embeded sub-interpreters (#5666)
ec8b05082 chore: convert changelog to markdown (#5672)
e62566843 fix(cmake): error wasn't triggering (#5676)
7319402a9 chore: show preview on docs changes (#5673)
3867c5f5a ci: add nightlies for scientific-python (#5675)
9e6fe464b chore: consolidate common code in PYBIND11_MODULE and PYBIND11_EMBEDDED_MODULE (#5670)
67424358f fix(types): add typing and collections.abc module prefix (#5663)
4587d33cf docs: prepare for v3.0.0rc1 (#5589)
cc86e8b2a fix(cmake): better --fresh support (#5668)
6bf25d1e3 feat: add semi-public API: `pybind11::detail::is_holder_constructed` (#5669)
9afc9c4ff feat: change PYBIND11_EMBEDDED_MODULE to multiphase init (#5665)
094343c74 fix: support Python 3.14 (#5646)
1107c0936 docs: Add documentation for mod_gil_not_used and multiple_interpreters (#5659)
af231a605 chore: use scikit-build-core for the build (#5598)
6aa3b335f fix(types): Buffer type hint (#5662)
95e8f89be Support for sub-interpreters (#5564)
05a6a03e7 chore(cmake): add CMake presets (#5655)
853bafa0a fix: use original dict (#5658)
c5dc6f9fb ci: bump default versions (#5657)
74b524271 feat: add `py::potentially_slicing_weak_ptr(handle)` function (#5624)
ce42c4df4 fix(cmake): avoid message if FINDPYTHON NEW (#5656)
d7d782c5e fix(regression): support embedded submodule (#5650)
9a191c245 Fix typos for FindPython compact mode: `Python_LIRAR{Y,IES}` -> `Python_LIBRAR{Y,IES}` (#5653)
c125cc789 Collect all `#define PYBIND11_HAS_...` in pybind11/detail/common.h (#5647)
002c05b17 fix: handle MSVC warning C4866: compiler may not enforce left-to-right evaluation order (#5641)
a265a4cf3 fix: define _DEBUG macro to 1 on redefinition (#5639)
099583c5f chore(deps): update pre-commit hooks (#5642)
c630e22c1 Add `static_assert`s to enforce that `py::smart_holder` is combined with `py::trampoline_self_life_support` (#5633)
c7f3460f1 Fix gcc compiler warnings (#5523)
d3fee4290 chore(deps): bump astral-sh/setup-uv from 5 to 6 in the actions group (#5632)
bc4a66dff fix: provide useful behavior of default `py::slice` (#5620)
5c498583c fix: upgrade 20.04 runners to 22.04 (fix for ICC, NVHPC) (#5621)
223e2e9da Fix missing pythonic type hints for native_enum (#5619)
3c586340f Add class doc string to native_enum (#5617)
b3bb31ca5 ci: work on speeding up further (#5613)
cbcc23855 Factor out pybind11/gil_simple.h (#5614)
ee04df0d0 Updated STL casters and py::buffer to use collections.abc (#5566)
f3c191382 Remove obsolete `"E501"` line in pyproject.toml (#5539)
662a88cbc ci: speed up ci a bit by thinning out matrix (#5602)
a2951abbe chore(deps): update pre-commit hooks (#5605)
d25e91fb8 fix(cmake): warning about missing file (#5612)
31e52b2cd Add holder caster traits tests in test_smart_ptr.cpp,py (#5603)
e38beb96c [skip ci] Move "Pitfalls with raw pointers and shared ownership" section to a more prominent location. (#5611)
1bd1d1ced Change `PyCFunction` cast in function_record_pyobject.h to sidestep unhelpful compiler warnings. (#5608)
708ce4d9c Fix GraalPy version parsing on dev builds (#5609)
a28ea8ccc Eliminate `pybindit` namespace (#5607)
6d1f28fe2 feat: remove make_simple_namespace (#5597)
73ad3099f fix: fully deprecate get_type_of (deprecated in 2.6 but no warning (#5596)
b70b8eb33 chore: require pytest 6 consistently (#5599)
fdab860a3 feat: drop PYBIND11_NUMPY_1_ONLY (#5595)
55b1357d8 chore: update nox and test deps (#5594)
8ef10a0ec ci: update to GraalPy 24.2 and mention in README (#5586)
d27fdaa27 chore: update for CMake 4.0 (#5593)
e03ec3063 Squashed function_record_std_launder/manuscript — 57b9a0af815d19b236b74be06a172bc5c9956618 — 2025-03-30 20:14:21 -0700 (#5592)
a34fcdc48 [ci skip] Response to question by gh-henryiii (pybind/pybind11#5580 (comment)) (#5591)
8726ed22d Fix build failure when `shared_ptr<T>` points to `private` `std::enable_shared_from_this` base (#5590)
e7e5d6e5b Make wrapped C++ functions pickleable (#5580)
8f00d1eea fix: set __file__ on submodules (#5584)
c1cd022f1 tests: Add test for `boost::histogram::func_transform` situation. (#5582)
f365314ec Enable Conversions Between Native Python Enum Types and C++ Enums (#5555)
48eb5ad9b Remove PyPy 3.8 and 3.9 testing. Make a pass through the entire repo to remove obviously obsolete workarounds for PyPy < 3.10. (#5578)
566894d5f Fix null pointer dereference in `attr_with_type_hint` (#5576)
974eba77a Change PYBIND11_MODULE to use multi-phase init (PEP 489) (#5574)
97022f83c TEST: test passes on PyPy macOS (#5569)
6412615eb Update NDArray[object] to be NDArray[numpy.object_] (#5571)
bb504dd80 fix: FindPython by default logic error (#5561)
655c60d84 docs: fix incorrect name (PYBIND11_NEWPYTHON) (#5570)
9f08625d6 Updated py::capsule type hint to use new types.CapsuleType (#5567)
dfe7e65b4 feat(types): Use `typing.SupportsInt` and `typing.SupportsFloat` and fix other typing based bugs. (#5540)
16b5abd42 chore: bump catch download to 2.13.10 (#5568)
d28904f12 feat: FindPython by default (#5553)
06e8ee2e3 chore(deps): bump actions/attest-build-provenance in the actions group (#5556)
d422fda12 chore(deps): bump jinja2 from 3.1.5 to 3.1.6 in /docs (#5554)
e24e300c7 chore(deps): update pre-commit hooks (#5547)
a822be20d chore(deps): bump the actions group with 2 updates (#5546)
ded70fe60 Add pkgconf-pypi entrypoint (#5552)
79be5c831 test: Explicitly mark char as signed in dtype tests (#5545)
2943a27a1 squash-merge smart_holder branch into master (#5542)
d8565ac73 Sync `Py_TPFLAGS_MANAGED_DICT` for PyPy3.11 across the codebase (#5537)
09b9f44ab add recently released pypy3.11 (#5534)
73825f351 Improved reference_internal documentation (#5528)
b7c33009a Start pybind11v3: Remove all code for `PYBIND11_INTERNALS_VERSION`s `4` and `5` (#5530)
241524223 feat(types) Numpy.typing.NDArray (#5212)
34a118fd3 Add `release_gil_before_calling_cpp_dtor` annotation for `class_` (#5522)
c316cf362 Make PYBIND11_INTERNALS_VERSION 6 the default on all platforms. (#5512)
31d7c870c Remove some maybe-uninitialized warnings (#5516)
d2e7e8c68 chore(deps): update pre-commit hooks (#5513)
ab44b307b Skip transient crash on GraalPy on OS X (#5514)
8862cd4e7 chore(deps): bump seanmiddleditch/gha-setup-ninja in the actions group (#5509)
fe87568f0 PyPy 3.11 does not implement Py_TPFLAGS_MANAGED_DICT (#5508)
82845c3b4 chore(deps): bump actions/attest-build-provenance in the actions group (#5503)
924261e81 chore(cmake): Add an author warning that auto-calculated `PYTHON_MODULE_EXTENSION` may not respect `SETUPTOOLS_EXT_SUFFIX` during cross-compilation (#5495)
c19c291b9 feat: --extension-suffix for pybind11 command (#5360)
167bb5f27 fix(cmake): don't strip with BUILD_TYPE None (#5392)
1b7aa0bb6 feat: rework of arg/return type hints to support .noconvert() (#5486)
15d9dae14 Fix data race when using shared variables (free threading) (#5494)
945e251a6 chore(deps): bump jinja2 from 3.1.4 to 3.1.5 in /docs (#5490)
a09cf6184 chore(deps): update pre-commit hooks (#5488)
c5ed9d4b1 Fix module type hint (#5469)
cf020a1de feat(types) Allow setting types for attributes (#5460)
5b503f7ec chore(deps): bump actions/attest-build-provenance in the actions group (#5468)
3e419485c `PYBIND11_PLATFORM_ABI_ID` Modernization Continued (platforms other than MSVC) (#5439)
741d86f2e Drop Clang dev CI job (#5464)
3ebdc503d chore(deps): bump actions/attest-build-provenance in the actions group (#5461)
b17555f34 chore(deps): update pre-commit hooks (#5459)
1d09fc830 Option for arg/return type hints and correct typing for std::filesystem::path (#5450)
a6d1ff246 fix: make PYBIND11_WARNING_POP actually pop clang diagnostics (#5448)
e7c9b9073 chore(deps): bump pypa/cibuildwheel in the actions group (#5451)
83b92ceb3 Try to fix reentrant write transient failures in tests (#5447)
330aae51c Remove mingw-w64-i686-python-numpy from mingw32 build (it does not seem to exist anymore). (#5445)
f41dae31a Add dtype::normalized_num and dtype::num_of (#5429)
b9fb3168a Add support for array_t<handle> and array_t<object> (#5427)
08095d9c7 Run pytest in verbose mode (#5443)
0ed20f26a chore(deps): bump actions/attest-build-provenance in the actions group (#5440)
7f94f24d6 feat(typing): allow annotate methods with `pos_only` when only have the `self` argument (#5403)
6d98d4d8d Add type hints for args and kwargs (#5357)
a90e2af88 Factor out pybind11/conduit/pybind11_platform_abi_id.h (#5375)
ec9c26817 Fix MSVC MT/MD incompatibility in PYBIND11_BUILD_ABI (#4953)
037310ea8 Use std::unique_ptr in pybind11_getbuffer (#5435)
ce2f00559 Fixed data race in all_type_info in free-threading mode (#5419)
f46f5be4f Fix incorrect link syntax in upgrade guide (#5434)
5c07feef2 chore(deps): update pre-commit hooks (#5432)
bc041de0d Fix buffer protocol implementation (#5407)
75e48c5f9 Skip transient tests on GraalPy (#5422)
f7e14e985 Address regression introduced in #5381 (#5396)
077e49fcd Export libc++ exceptions (#5390)
f2907651f Fix #5399: iterator increment operator does not skip first item (#5400)
af67e8739 docs/advanced A document about deadlock potential with C++ statics (#5394)
56e69a20a Print key in KeyError in map.__getitem__/__delitem__ (#5397)
c4a05f934 Add support for GraalPy (#5380)
7e418f492 Allow subclasses of py::args and py::kwargs (#5381)
1f8b4a7f1 fix(cmake): `NO_EXTRAS` in `pybind11_add_module` function partially working (#5378)
ad9fd39e1 chore(deps): bump pypa/cibuildwheel in the actions group (#5376)
1d9483ff7 Added exception translator specific mutex used with try_translate_exceptions (#5362)
a7910be63 Add warn disable for GGC 12 bound checking error (#5355)
0cf3a0f7b ci: PyPI attestations (#5374)
5b7c0b04b docs: update changelog for 2.13.6 (#5372)
ef5a9560b Enable type-safe interoperability between different independent Python/C++ bindings systems. (#5296)
5efc7439d chore(deps): bump the actions group with 2 updates (#5361)
8a801bdc3 chore(deps): update pre-commit hooks (#5350)
aeda49ed0 Properly translate C++ exception to Python exception when creating Python buffer from wrapped object (#5324)
66c3774a6 Warnings wrappers to use from C++ (#5291)
65f4266ce Add `while True` & `top` method to FAQ. (#5340)
3fb16ad17 fix: using `__cpp_nontype_template_args` instead of `__cpp_nontype_template_parameter_class` (#5330)
e8f595bb8 chore(deps): bump actions/attest-build-provenance in the actions group (#5335)
c2291e597 docs: prepare for 2.13.5 (#5327)
efa2b20d6 docs: clarify requirements for including pybind11 (#5326)
9966ad409 fix: allow -Wpedantic in C++20 mode (#5322)
2baf9d683 fix: `<ranges>` support for `py::tuple` and `py::list` (#5314)
7d85baa6a fix: never use `..` in a header include (#5321)
a1d00916b Backport of google/pybind11clif#30034 (#5305)
bd5951b69 docs: prepare for 2.13.4 (#5312)
28dbce415 feat: require CMake 3.15+ (#5304)
d893f9723 fix: escape paths with spaces in pybind11-config (#4874)
fc97cc41d Revert "fix: quote paths from pybind11-config (#5302)" (#5309)
011690618 chore: remove repetitive words (#5308)
0d44d720c Make stl.h `list|set|map_caster` more user friendly. (#4686)
4a06eca59 docs: prepare for 2.13.3
8d9f4d50c fix: quote paths from pybind11-config (#5302)
1fe92c7b3 fix: emscripten cmake issue (#5301)
40f2c7863 docs: prepare for 2.13.2 (#5299)
8d90b83b1 chore(deps): bump actions/attest-build-provenance in the actions group (#5297)
fc59f4e6e fix(cmake): add required emscripten flags (#5298)
898794488 Add `type_caster_std_function_specializations` feature. (#4597)
20551ab3d chore(deps): update pre-commit hooks (#5288)
845105383 chore(deps): bump the actions group with 2 updates (#5287)
916778df4 fix: typo in documentation (#5284)
723307283 feat: remove Python 3.7 support (#5191)
2e260b067 clang-tidy upgrade (to version 18) (#5272)
8e7307f06 docs: remove outdated known limitation. (#5263)
6d4805ced Small cleanup/refactoring in support of PR #5213 (#5251)
a582ca8a8 tests: run on pyodide (#4745)
dbf848aff docs: extend `PYBIND11_MODULE` documentation, mention `mod_gil_not_used` (#5250)
43de8014f fix: make gil_safe_call_once thread-safe in free-threaded CPython (#5246)
ccefee4c3 chore(deps): bump actions/attest-build-provenance in the actions group (#5243)
50acb81b0 chore(deps): bump certifi from 2024.2.2 to 2024.7.4 in /docs (#5226)
bb05e0810 Use PyMutex instead of std::mutex in free-threaded build. (#5219)
b21b04902 chore(deps): update pre-commit hooks (#5220)
d78446cc2 chore(deps): bump actions/attest-build-provenance in the actions group (#5216)
d805e9967 feat(types) Adds special Case for empty C++ tuple type annotation (#5214)
51c2aa16d Fixed a compilation error with gcc 14 (#5208)
08f946a43 fix: add guard for GCC <10.3 on C++20 (#5205)
e0f9e7746 fix(cmake): remove extra = in flto assignment (#5207)
57287b578 docs: prepare for 2.13.1 (#5203)
4bd538a40 feat(types): add support for Typing.Callable Special Case (#5202)
2e35470cf fix: use manual padding of instance_map_shard (#5200)
895e65722 chore: back to work
REVERT: a2e59f0e7 chore: bump to 2.13.6
REVERT: e445ca2bd ci: PyPI attestations (#5374)
REVERT: 7b67d8e97 docs: update changelog for 2.13.6 (#5372)
REVERT: a5fcc5602 Enable type-safe interoperability between different independent Python/C++ bindings systems. (#5296)
REVERT: 54ab42496 chore(deps): bump the actions group with 2 updates (#5361)
REVERT: 36ee4674f chore(deps): update pre-commit hooks (#5350)
REVERT: 9e6a67d57 Properly translate C++ exception to Python exception when creating Python buffer from wrapped object (#5324)
REVERT: 570d323bb Add `while True` & `top` method to FAQ. (#5340)
REVERT: b9f85757d fix: using `__cpp_nontype_template_args` instead of `__cpp_nontype_template_parameter_class` (#5330)
REVERT: 0a96ff7e9 chore(deps): bump actions/attest-build-provenance in the actions group (#5335)
REVERT: 7c33cdc2d chore: prepare for 2.13.5
REVERT: b3f5f2e74 docs: prepare for 2.13.5 (#5327)
REVERT: a4f6627da docs: clarify requirements for including pybind11 (#5326)
REVERT: 0d21cadca fix: allow -Wpedantic in C++20 mode (#5322)
REVERT: ff3ca7864 fix: `<ranges>` support for `py::tuple` and `py::list` (#5314)
REVERT: b0050f30d fix: never use `..` in a header include (#5321)
REVERT: c6239a8a1 chore: version 2.13.4
REVERT: 63b0d146d docs: prepare for 2.13.4 (#5312)
REVERT: 973a16e9a fix: escape paths with spaces in pybind11-config (#4874)
REVERT: 75c11769b Revert "fix: quote paths from pybind11-config (#5302)" (#5309)
REVERT: 6685547e3 chore: remove repetitive words (#5308)
REVERT: bd6764365 chore: prepare for 2.13.3
REVERT: 7662af69c docs: prepare for 2.13.3
REVERT: 45eaee91d fix: quote paths from pybind11-config (#5302)
REVERT: 835139f5d fix: emscripten cmake issue (#5301)
REVERT: 07f30430d chore: prepare for 2.13.2
REVERT: 6d5704cd2 docs: prepare for 2.13.2 (#5299)
REVERT: 6ee574fab chore(deps): bump actions/attest-build-provenance in the actions group (#5297)
REVERT: d8fcfe341 fix(cmake): add required emscripten flags (#5298)
REVERT: 78e26321c Add `type_caster_std_function_specializations` feature. (#4597)
REVERT: 44d0d9a41 chore(deps): update pre-commit hooks (#5288)
REVERT: fe808a011 chore(deps): bump the actions group with 2 updates (#5287)
REVERT: f9ae715d4 fix: typo in documentation (#5284)
REVERT: 042c3cfdc clang-tidy upgrade (to version 18) (#5272)
REVERT: 667563dd5 docs: remove outdated known limitation. (#5263)
REVERT: 129934ad9 Small cleanup/refactoring in support of PR #5213 (#5251)
REVERT: f50830eae tests: run on pyodide (#4745)
REVERT: b43074533 docs: extend `PYBIND11_MODULE` documentation, mention `mod_gil_not_used` (#5250)
REVERT: f3a6d4145 fix: make gil_safe_call_once thread-safe in free-threaded CPython (#5246)
REVERT: d699e99c5 chore(deps): bump actions/attest-build-provenance in the actions group (#5243)
REVERT: 4b2f7cd65 chore(deps): bump certifi from 2024.2.2 to 2024.7.4 in /docs (#5226)
REVERT: 8443d0841 Use PyMutex instead of std::mutex in free-threaded build. (#5219)
REVERT: 41726b643 chore(deps): update pre-commit hooks (#5220)
REVERT: ea10a69da chore(deps): bump actions/attest-build-provenance in the actions group (#5216)
REVERT: a4dd41a18 feat(types) Adds special Case for empty C++ tuple type annotation (#5214)
REVERT: 639ca6a71 Fixed a compilation error with gcc 14 (#5208)
REVERT: 65afa13eb fix: add guard for GCC <10.3 on C++20 (#5205)
REVERT: 3074608eb fix(cmake): remove extra = in flto assignment (#5207)
REVERT: 941f45bcb chore: prepare for 2.13.1
REVERT: 63020d336 docs: prepare for 2.13.1 (#5203)
REVERT: dd0e4a0b8 feat(types): add support for Typing.Callable Special Case (#5202)
REVERT: 3b47b4648 fix: use manual padding of instance_map_shard (#5200)
git-subtree-dir: source/pybind11
git-subtree-split: 97bf890db679505a14dfe547a5e77bb2bd05dc90
Description
Loosely related: pybind/pybind11#864
However, this PR is specific to
array_caster; practically speaking, specific tostd::arrayconversions.This PR preserves the existing
array_casterbehavior as much as possible. The only difference is that it also works for value types that are not default-constructible. — Note that without this PR, the new test results in a compiler error.This resolves failures when testing globally with PyCLIF-pybind11.
Suggested changelog entry: