Skip to content

[v638] Backports of recent fixes#21909

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

[v638] Backports of recent fixes#21909
guitargeek merged 3 commits intoroot-project:v6-38-00-patchesfrom
guitargeek:bp_1

Conversation

@guitargeek
Copy link
Copy Markdown
Contributor

ferdymercury and others added 3 commits April 14, 2026 14:06
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

Test Results

    19 files      19 suites   3d 0h 31m 53s ⏱️
 3 716 tests  3 713 ✅ 0 💤 3 ❌
68 883 runs  68 880 ✅ 0 💤 3 ❌

For more details on these failures, see this check.

Results for commit 64e29a1.

@guitargeek guitargeek merged commit 4b5dc55 into root-project:v6-38-00-patches Apr 14, 2026
25 of 29 checks passed
@guitargeek guitargeek deleted the bp_1 branch April 14, 2026 15:56
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