Skip to content

Conversation

@rwgk
Copy link
Contributor

@rwgk rwgk commented Mar 24, 2023

Description

Helper/scratch PR for testing.

Suggested changelog entry:

dependabot bot and others added 4 commits March 23, 2023 10:23
…ogle#4584)

Bumps [pypa/gh-action-pypi-publish](https://github.com/pypa/gh-action-pypi-publish) from 1.8.1 to 1.8.3.
- [Release notes](https://github.com/pypa/gh-action-pypi-publish/releases)
- [Commits](pypa/gh-action-pypi-publish@v1.8.1...v1.8.3)

---
updated-dependencies:
- dependency-name: pypa/gh-action-pypi-publish
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* Add test_class_sh_property_non_owning.cpp,py

Failing:

```
__________________________________________________________ test_persistent_holder __________________________________________________________

    def test_persistent_holder():
        h = m.DataFieldsHolder(2)
>       c = h.vec_at(0).core_fld
E       RuntimeError: Non-owning holder (loaded_as_shared_ptr).

h          = <pybind11_tests.class_sh_property_non_owning.DataFieldsHolder object at 0x7fabab516470>

test_class_sh_property_non_owning.py:6: RuntimeError
__________________________________________________________ test_temporary_holder ___________________________________________________________

    def test_temporary_holder():
        d = m.DataFieldsHolder(2).vec_at(1)
>       c = d.core_fld
E       RuntimeError: Non-owning holder (loaded_as_shared_ptr).

d          = <pybind11_tests.class_sh_property_non_owning.DataField object at 0x7fabab548770>

test_class_sh_property_non_owning.py:13: RuntimeError
```

* Introduce `shared_ptr_from_python(responsible_parent)` and use in all `property_cpp_function`s with `const shared_ptr<T> &` arguments.

Tests are incomplete.

* Complete tests.

* Add comment for `smart_holder_type_caster_load<T>::shared_ptr_from_python`
@rwgk
Copy link
Contributor Author

rwgk commented Mar 24, 2023

Giving up on this merge attempt.
Note that GHA were a full success.
But there were two pesky oversights:

@rwgk rwgk closed this Mar 24, 2023
@rwgk rwgk deleted the pywrapcc_merge_sh branch March 24, 2023 06:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant