mirror of
https://github.com/pybind/pybind11.git
synced 2025-03-23 00:56:43 +00:00
* Add `gil_scoped_acquire` to `shared_ptr_trampoline_self_life_support` ctor. * Add test exercising fix & validation that the fix is needed (i.e. this is BROKEN). test_class_sh_trampoline_shared_ptr_cpp_arg.py::test_std_make_shared_factory[pass_through_shd_ptr] PASSED [ 87%] test_class_sh_trampoline_shared_ptr_cpp_arg.py::test_std_make_shared_factory[pass_through_shd_ptr_release_gil] FAILED [100%] ``` ================================================================= FAILURES ================================================================= ______________________________________ test_std_make_shared_factory[pass_through_shd_ptr_release_gil] ______________________________________ pass_through_func = <built-in method pass_through_shd_ptr_release_gil of PyCapsule object at 0x7f1b209707b0> @pytest.mark.parametrize( "pass_through_func", [m.pass_through_shd_ptr, m.pass_through_shd_ptr_release_gil] ) def test_std_make_shared_factory(pass_through_func): class PyChild(m.SpBase): def __init__(self): super().__init__(0) obj = PyChild() while True: > assert pass_through_func(obj) is obj E RuntimeError: NEEDED HERE: gil_scoped_acquire gil; ``` * Put back fix. |
||
---|---|---|
.. | ||
detail | ||
stl | ||
attr.h | ||
buffer_info.h | ||
cast.h | ||
chrono.h | ||
common.h | ||
complex.h | ||
eigen.h | ||
embed.h | ||
eval.h | ||
functional.h | ||
gil.h | ||
iostream.h | ||
numpy.h | ||
operators.h | ||
options.h | ||
pybind11.h | ||
pytypes.h | ||
smart_holder.h | ||
stl_bind.h | ||
stl.h | ||
trampoline_self_life_support.h |