Uh oh!
There was an error while loading. Please reload this page.
fix: <ranges> support for py::tuple and py::list - #5314
Conversation
ObeliskGate
commented
Aug 17, 2024
There's two tiny questions:
|
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
rwgk
commented
Aug 17, 2024
pypy has so many problems and flakes so often, I wouldn't want to add another (flaky) job. |
rwgk
commented
Aug 17, 2024
No. We have so much test coverage across other compilers, we don't need to get that one. |
rwgk
left a comment
There was a problem hiding this comment.
Looks nice, but caveat: I'm not familiar with <ranges>, std::random_access_iterator, std::ranges::views::transform.
I'll merge this after you condense the code around PYBIND11_TEST_PYTYPES_HAS_RANGES.
Uh oh!
There was an error while loading. Please reload this page.
<ranges> support for py::tuple and py::list<ranges> support for py::tuple and py::list* feat: add `<ranges>` support for `py::tuple` and `py::list` * fix: format the code * fix: disable `ranges` in clang < 16 * refactor: move `<ranges>` test macro to `test_pytypes.h` * refactor: seperate `ranges` test into 3 funcs * style: compress the if statement * style: pre-commit fixes * style: better formatting --------- Co-authored-by: Henry Schreiner <HenrySchreinerIII@gmail.com> Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Description
It seems that #4127 has made a mistake there: actually p2325r3 says nothing about C++ sentinels (which always requires
semiregular), so it's necessary to add a default constructor foriterator_policiesclasses.Moreover,
forward_iteratorconcept requires that:and it's tested here:
https://github.com/ObeliskGate/pybind11/blob/74615a04105366647261da83f2980cd5df01b3cd/tests/test_pytypes.cpp#L932-L940
, together with other simple tests.
Suggested changelog entry: