Repository navigation
Align set and dictionary view operation controls - #9693
Draft
youknowdot wants to merge 6 commits into
Draft
youknowdot wants to merge 6 commits into
youknowdot wants to merge 6 commits into
Conversation
Convert iterable operands when each operation reaches them, share precise hash-error decoration, and preserve mutable-set keys for fallback lookup. Reuse stored hashes according to each operation and align symmetric difference comparison order while retaining reentrancy-safe table updates. Assisted-by: OpenAI Codex:model version not exposed
Assisted-by: OpenAI Codex:model version not exposed
Contributor
|
Important Draft PR not reviewedDraft PRs are not automatically reviewed by default.
To automatically review draft PRs, update your CodeRabbit configuration: reviews:
auto_review:
drafts: true
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. |
Assisted-by: OpenAI Codex:model version not exposed
Assisted-by: OpenAI Codex:model version not exposed
Preserve the extracted dict and set error helper while retaining qualified type names and exception messages through lossless concatenation. Assisted-by: OpenAI Codex:model version not exposed
This was referenced Nov 4, 2026
Retain the current dictionary-view item until its iterator and partial result have been released, including consuming set insertion failures. Assisted-by: OpenAI Codex:model version not exposed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Align native set operands, hashing, and related dictionary-view operations with CPython 3.15, using existing shared conversion and dictionary primitives.
The related dictionary-view work is folded into this PR rather than creating an overlapping change. Total: 788 changed lines in three production Rust files. No Python/Lib/test logic, markers, or workflows changed. Existing native test callers remain intact.
Validation
-D warningsremains blocked by that baseline; no suppression or unrelated baseline edits.AI-assisted implementation and independent review using OpenAI Codex; model version is not exposed.
Shared type-name compatibility
The extracted dict/set hash-error helper uses the existing WTF-8 concatenation mechanism, preserving both type names and exception text when composed with #9700. Other set/dictionary-view behavior is byte-identical to the previously reviewed head. Independent in-memory composition review verified the exact previous head plus this narrow formatting change. Final focused host-env/VM/stdlib threading check, normal all-targets Clippy and ordinary hooks passed; the same four unchanged baseline diagnostics remain. No new runtime execution or test changes are claimed.
Intersection failure cleanup
The shared fallback now retains the current item through both membership testing and consuming set insertion. On failure it explicitly releases the iterator, partial result, and current item in that order. Accepted and rejected candidates are released before requesting the next item. Existing exact-set delegation, view-size swapping, and symmetric-difference paths are unchanged.
Independent frozen-source ownership review found no blocker. The additional pinned CPython reference checks passed 60 assertions across 16 groups plus 20 independent assertions, covering direct/reflected keys/items operations, membership and insertion failures, iterator failures, normal exhaustion, and candidate cleanup before the next request. These establish reference behavior and source review, not RustPython runtime execution. Cached item-tuple identity/reuse remains outside this change because it requires a separately reviewed tuple ownership/GC design.
Final threaded host-env/VM/stdlib check passed in 1m09s and all-targets Clippy in 2m24s, with exactly the same four baseline diagnostics (one POSIX and three ElementTree). Ordinary commit hooks passed. No native RustPython or full-suite execution is claimed.