Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

git merge smart_holder #30078

Merged
merged 8 commits into from
Nov 8, 2023
Merged

git merge smart_holder #30078

merged 8 commits into from
Nov 8, 2023

Conversation

rwgk
Copy link
Contributor

@rwgk rwgk commented Nov 8, 2023

Description

Helper/scratch PR for testing.

Suggested changelog entry:

Social-Mean and others added 8 commits November 3, 2023 23:51
* Use PyCode API

* style: pre-commit fixes

* Free locals

* Fix PY_VERSION_HEX check

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Ensures `std::default_delete<T>` is used to look up the deleter for a type instead of `delete` directly.
* Roundtrip through unique pointer with custom deleter.

Currently failing.

* Ensure the custom deleter is copied back to the unique pointer.

Feels like there's still a gap around the raw pointer flavour, but this at least
makes the unit test of the previous commit succeed.

* Add deleter roundtrip for const atyp.

Currently failing, custom deleter is lost.

* Fix storing deleter for const unique ptr.

Unit test from the previous commit passes.

* Remove SFINEA deleter assignment.

At the construction of the smart holder, it is either a del_fun, or a default constructed deleter, so this complexity is unnecessary.

* Clang format.

* Fixes for ci.

Clang 3.6 requires the extra constructors in the custom_deleter.

* fix(smart_holder): Loosen requirement on deleter to be default constructible.

And some other PR feedback.

* fix(smart_holder): Custom deleter in unit tests traces constructions.

* fix(smart_holder): Use pybind11_fail instead of assert.

* fix(smart_holder): Add unit tests for the default constructible deleter.

* fix(smart_holder): Use regex matching for deleter constructors in unit tests.
updates:
- [github.com/pre-commit/mirrors-clang-format: v17.0.3 → v17.0.4](pre-commit/mirrors-clang-format@v17.0.3...v17.0.4)
- [github.com/astral-sh/ruff-pre-commit: v0.1.2 → v0.1.4](astral-sh/ruff-pre-commit@v0.1.2...v0.1.4)

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Signed-off-by: Henry Schreiner <henryschreineriii@gmail.com>
Co-authored-by: Ralf W. Grosse-Kunstleve <rwgk@google.com>
Copy link

google-cla bot commented Nov 8, 2023

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

@rwgk rwgk marked this pull request as ready for review November 8, 2023 16:27
@rwgk rwgk merged commit a66e50e into google:main Nov 8, 2023
147 checks passed
@rwgk rwgk deleted the pywrapcc_merge_sh branch November 8, 2023 16:28
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.

5 participants