pybind11/include/pybind11
Ralf W. Grosse-Kunstleve 59ef5307ae
[smart_holder] Add gil_scoped_acquire to shared_ptr_trampoline_self_life_support ctor. (#4196)
* 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.
2022-10-07 12:24:49 -07:00
..
detail [smart_holder] Add gil_scoped_acquire to shared_ptr_trampoline_self_life_support ctor. (#4196) 2022-10-07 12:24:49 -07:00
stl feature: support compilers that use std::experimental::filesystem (#3840) 2022-03-31 22:16:10 -07:00
attr.h Fix: 3.11 beta support (#3923) 2022-07-06 16:35:12 -04:00
buffer_info.h Fully-automatic clang-format with include reordering (#3713) 2022-02-10 12:17:07 -08:00
cast.h [smart_holder] type_caster ODR guard (#4022) 2022-07-21 06:38:21 -07:00
chrono.h chore: drop Python 3.5 (#3719) 2022-02-11 19:06:16 -05:00
common.h Add a dummy common.h header with a deprecation warning 2017-09-06 15:22:26 +02:00
complex.h Fully-automatic clang-format with include reordering (#3713) 2022-02-10 12:17:07 -08:00
eigen.h Merge branch 'master' into sh_merge_master 2022-08-07 15:43:25 -07:00
embed.h embed.h Python 3.11 config.use_environment=1 + PYTHONPATH test (#4119) 2022-08-21 09:44:01 -07:00
eval.h fix: missing move in eval.h (#3775) 2022-03-02 15:25:43 -05:00
functional.h remove useless ctor (#3989) 2022-06-03 15:18:06 -04:00
gil.h Replace error printing code gated by NDEBUG with a new flag: PYBIND11_DETAILED_ERROR_MESSAGES (#3913) 2022-05-02 15:30:19 -04:00
iostream.h chore: add err guard to capsule destructor and add a move to iostream (#3958) 2022-05-27 14:32:57 -04:00
numpy.h Words matter updates (#4155) 2022-08-24 07:34:31 -07:00
operators.h Python 2 removal part 1: tests (C++ code is intentionally ~untouched) (#3688) 2022-02-10 18:28:08 -08:00
options.h Fully-automatic clang-format with include reordering (#3713) 2022-02-10 12:17:07 -08:00
pybind11.h Merge branch 'master' into sh_merge_master 2022-08-07 15:43:25 -07:00
pytypes.h error_fetch_and_normalize: PyPy 7.3.10+ does not need the PR #4079 workaround anymore. (#4154) 2022-08-24 13:08:24 -07:00
smart_holder.h Automatic pre-commit run --all-files and clang-tidy changes (NO manual changes). 2022-02-14 19:00:40 -08:00
stl_bind.h Merge branch 'master' into sh_merge_master 2022-04-12 15:48:59 -07:00
stl.h Merge branch 'master' into sh_merge_master 2022-08-21 19:32:35 -07:00
trampoline_self_life_support.h Removing obsolete detail/pragma_warning_block.h 2021-08-14 08:42:38 -07:00