Repository navigation
Align function construction and metadata controls - #9717
Draft
youknowdot wants to merge 1 commit into
Draft
youknowdot wants to merge 1 commit into
youknowdot wants to merge 1 commit into
Conversation
Preserve constructor binding, validation, audit veto and argument owners. Audit public metadata without changing internal reads, retaining live-field semantics and Unicode names. 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. |
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 function construction and public metadata controls with Python 3.15 in one production Rust file (+209/-68).
No handwritten per-function argument parser, tests, Lib, markers or workflow changes. Existing bound-method and annotation changes remain outside this patch.
Validation
Compared with pinned CPython function controls and its generated Clinic signature. Independent source review passed, including owner lifetimes, audit timing/payloads, lock boundaries and unaudited internal callers.
Reference probes passed 71 metadata cases, four doc initialization cases, 1,024 positional/keyword layouts compared with the shared binder model, and 27 additional metadata/Unicode/hook cases. Constructed or modified code/functions were only inspected, never executed. These are CPython/source checks, not a RustPython runtime pass.
Limits and integration
Old code ownership remains deferred by the existing swap_to_temporary_refs mechanism. CPython releases old code constants earlier, but changing that here would undermine the outstanding-borrow safety design; no immediate-destruction parity is claimed. Shared unexpected-keyword surrogate formatting also remains unchanged. Function deallocation/GC redesign, JIT behavior and annotation reentrancy are outside scope.
Fresh relevant PR patches were checked and do not duplicate this group. Composing #9715 has one textual conflict in function.rs imports: retain this patch's PyDict/PyTypeRef imports and remove PyList once its custom method directory is removed. Independent read-only apply checks confirmed all other hunks apply after that import-only resolution. Combined branches were not compiled or executed. Preserve #9700 annotation diagnostics; that region is unchanged here. #6894 changes freevar representation, and #8624 has adjacent JIT invalidation work that requires preserving its logic if integrated. No combined runtime claim is made.
Native RustPython execution, full workspace/C-API suites and separate cross-platform graphs remain unperformed. Hosted CI is required.
AI-assisted implementation and independent review using OpenAI Codex; model version is not exposed.
Final validation: threaded host-env/VM/stdlib cargo check passed in 1m26s and all-targets Clippy in 3m00s. All 12 existing baseline diagnostics match exactly. Normal repository commit hooks passed; no suppression or unrelated baseline changes.