Skip to content

[v636] Backports of recent fixes#21910

Merged
guitargeek merged 3 commits intoroot-project:v6-36-00-patchesfrom
guitargeek:bp_2
Apr 14, 2026
Merged

[v636] Backports of recent fixes#21910
guitargeek merged 3 commits intoroot-project:v6-36-00-patchesfrom
guitargeek:bp_2

Conversation

@guitargeek
Copy link
Copy Markdown
Contributor

ferdymercury and others added 3 commits April 14, 2026 14:10
Guard the automatic size() -> __len__ pythonization to require that
size() returns an integer type and the class has begin()/end() methods
or operator[]. This prevents bool() returning False for valid objects
whose size() returns non-integer types like std::optional<std::size_t>.

Use Cppyy::IsIntegerType (backed by Clang's QualType) to check the
return type, which correctly resolves typedefs like size_type. Walk the
MRO when checking for size/begin/end/getitem attributes, since
HasAttrDirect only checks the class's own __dict__. Skip pythonization
if size() has multiple overloads.

Update tests for stl_like_class2/3 which have incomplete container
interfaces (missing iterators or returning non-iterator types from
begin/end).

(cherry picked from commit cccbacc)
@github-actions
Copy link
Copy Markdown

github-actions bot commented Apr 14, 2026

Test Results

    18 files      18 suites   2d 14h 2m 29s ⏱️
 2 753 tests  2 747 ✅  1 💤 5 ❌
47 846 runs  47 829 ✅ 12 💤 5 ❌

For more details on these failures, see this check.

Results for commit 2dac23f.

♻️ This comment has been updated with latest results.

@guitargeek guitargeek merged commit 2d32dbf into root-project:v6-36-00-patches Apr 14, 2026
36 of 41 checks passed
@guitargeek guitargeek deleted the bp_2 branch April 14, 2026 15:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants