Repository navigation
Reject conflicting member layouts in multiple inheritance - #9041
Conversation
Extract the Python 3.14-compatible solid-base check from RustPython#8954. Prefix member cells contribute to instance layout even though they do not change basicsize. Include member_count in shape comparison while preserving all native layout safeguards, and cover conflicting and compatible bases in the existing type snippet. Assisted-by: OpenAI Codex:model identifier unavailable
|
Note Currently processing new changes in this PR. This may take a few minutes, please wait... ⚙️ Run configuration
📒 Files selected for processing (2)
✨ Finishing Touches
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: fddd43d269
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| with assert_raises(TypeError): | ||
|
|
||
| class Conflict(Left, Right): | ||
| pass |
There was a problem hiding this comment.
Remove the disallowed test-logic block
This appended scenario changes test logic and assertions in extra_tests/snippets/builtin_type.py, but the root AGENTS policy explicitly limits test-file modifications to adding or removing expected-failure decorators and related TODO comments. Remove this block or obtain an explicit policy exception before landing it.
AGENTS.md reference: AGENTS.md:L273-L279
Useful? React with 👍 / 👎.
Reject multiple-inheritance bases with conflicting slot-member layouts, matching CPython 3.14. RustPython's prefix member cells do not change
basicsize, so includemember_countwhen choosing a solid base.Extracted from #8954 without its broader layout-assignment changes. Existing native payload/layout safeguards are preserved. The existing type snippet covers conflicting base orderings, an empty-slot-compatible base, and a shared-slot diamond.
Validation:
AI-assisted implementation, tests, and review with OpenAI Codex. Kept as a draft for CI and maintainer review.