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

[smart_holder] git merge master #3924

Merged
merged 7 commits into from
May 6, 2022
Merged

Conversation

rwgk
Copy link
Collaborator

@rwgk rwgk commented May 5, 2022

Description

Helper/scratch PR for testing.

Also applying PR #3913-related mechanical changes to smart_holder_type_casters.h.

Suggested changelog entry:

Skylion007 and others added 7 commits May 4, 2022 13:02
* Update PGI workflow

* Remove copy paste typo

* ci: fix debian image

Co-authored-by: Henry Schreiner <HenrySchreinerIII@gmail.com>
updates:
- [github.com/hadialqattan/pycln: v1.3.1 → v1.3.2](hadialqattan/pycln@v1.3.1...v1.3.2)
- [github.com/PyCQA/pylint: v2.13.5 → v2.13.8](pylint-dev/pylint@v2.13.5...v2.13.8)
- [github.com/pre-commit/mirrors-mypy: v0.942 → v0.950](pre-commit/mirrors-mypy@v0.942...v0.950)
* Add frozenset, and allow it cast to std::set

For the reverse direction, std::set still casts to set. This is in concordance with the behavior for sequence containers, where e.g. tuple casts to std::vector but std::vector casts to list.

Extracted from pybind#3886.

* Rename set_base to any_set to match Python C API

since this will be part of pybind11 public API

* PR: static_cast, anyset

* Add tests for frozenset

and rename anyset methods

* Remove frozenset default ctor, add tests

Making frozenset non-default constructible means that we need to adjust pyobject_caster to not require that its value is default constructible, by initializing value to a nil handle.  This also allows writing C++ functions taking anyset, and is arguably a performance improvement, since there is no need to allocate an object that will just be replaced by load.

Add some more tests, including anyset::empty, anyset::size, set::add and set::clear.

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Add rationale to `pyobject_caster` default ctor

* Remove ineffectual protected: access control

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
@rwgk
Copy link
Collaborator Author

rwgk commented May 6, 2022

The 2 CI failures are our "currently known tool failures" (2 x as already on master).

Skipping Google-global testing (deemed reasonably safe).

@rwgk rwgk merged commit 72f51e1 into pybind:smart_holder May 6, 2022
@github-actions github-actions bot added the needs changelog Possibly needs a changelog entry label May 6, 2022
@rwgk rwgk removed the needs changelog Possibly needs a changelog entry label May 6, 2022
@rwgk rwgk deleted the sh_merge_master branch May 6, 2022 03:01
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.

4 participants