Repository navigation
Separate constructor and instance vectorcall dispatch - #9320
Merged
youknowone merged 1 commit intoOct 23, 2026
Merged
Conversation
Keep constructor fast paths separate from per-instance vectorcall support. Track automatic eligibility without discarding raw support required by PyVectorcall_Call, and recheck eligibility in retained callable wrappers. Implementation and source review were AI-assisted. The model version identifier is unavailable; automated checks are not human verification. Assisted-by: OpenAI Codex:model version unavailable
Contributor
|
Note Currently processing new changes in this PR. This may take a few minutes, please wait... ⚙️ Run configuration
📒 Files selected for processing: 19
✨ 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 |
youknowone
approved these changes
Oct 23, 2026
youknowone
marked this pull request as ready for review
October 23, 2026 08:59
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. |
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
Separate constructor vectorcall from instance-call capability, and distinguish retained raw support from automatic vectorcall eligibility.
__call__revokes automatic eligibility without deleting raw support.PyVectorcall_Callentry point use retained raw support directly, without an artificialtp_callfallback/precondition.__call__between two regex replacement calls.This is a Python 3.15 upgrade prerequisite, not the complete
_testcapifixture integration.Validation
Tested commit
0624705569dff7c3954f9129ba8b9d04469872d7on basee5554e23abfbaee85508c32fc22e5074f88aebdd, Linux x86-64, Rust 1.99.1:A separately built CPython 3.15.0 final (
d220409a13b77de7a6c30abe16ea90db01528edc) was compared with the source-bound RustPython binary in fresh processes:wrapper_descriptorretains its genuine native vectorcall capability, whereas CPython does not expose that flag for its implementation. Immutable-type and method-descriptor flags agree. This is not reported as universal flag parity.ABon both interpreters after__call__changes during the first call.test_functools/test_calltests: 19 ordinary passes, zero failures, errors, skips, expected failures or unexpected successes.No baseline runtime comparison, benchmark, full test suite, external C ABI runtime, PyO3 bridge runtime, or non-Linux execution is claimed. C API validation here is source review plus compilation/linting.
Integration boundaries
Raw storage and automatic eligibility are now distinct. Related call-slot inheritance work in #6301 must preserve that distinction rather than mechanically transplanting the old architecture. For a plain-metaclass adaptation that intentionally disables automatic vectorcall, the current mechanism is
slots.flags.remove(PyTypeFlags::HAVE_VECTORCALL), not deleting retained raw storage. This is an unvalidated downstream integration note, not a claim about that PR's broader compatibility.This patch does not implement arbitrary concurrent native slot replacement, cached-None/ArgCallable redesign, C API kwargs error-precedence changes, or the custom-MRO missing-call/fresh-dispatch edge. It does not change lifecycle ownership or the #8944 retirement contract.
Implementation, review and automated validation were AI-assisted. The model version identifier is unavailable. Automated validation is not human verification.