Repository navigation
Export the stable ABI PyCFunction_Call shim - #9055
Conversation
Assisted-by: OpenAI Codex:model identifier unavailable
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 44 minutes. View limit details
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 |
bschoenmaeckers
left a comment
There was a problem hiding this comment.
We do not have to export this function. This function is only available on abi3, but not abi3t. So this function can never be used.
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. |
oh.. sorry I missed this. Thank you for pointing it out |
|
@bschoenmaeckers Agreed. I checked call behavior but missed whether this legacy ABI-only export belongs to RustPython’s abi3t target. Follow-up draft #9059 removes exactly the ten lines introduced here, without adding or changing other exports. The CAPI-enabled build and Clippy pass; export inspection confirms PyCFunction_Call is absent while PyObject_Call and PyCFunction_New remain. |
Follow up on #9055: RustPython targets abi3t, which does not require this legacy binary-compatibility entry point. Assisted-by: OpenAI Codex:model identifier unavailable
Summary
Extract the independent
PyCFunction_Callstable-ABI shim from #8954 (43065e79ddc46eafeca58cb39398ac007b5d25f7). This is already part of the Python 3.14 contract: although its public declaration was removed in 3.13, the binary symbol remains available and delegates directly toPyObject_Call.The production change is ten lines in
crates/capi/src/methodobject.rs. It preserves main's existing argument-validation tests, including #8957, and makes no loader, lifecycle, error-storage, or test-framework changes. #8435 touches the same file but does not supply this symbol; the separate C-API work in #8951 is excluded.References: CPython 3.14.7 call implementation, stable ABI manifest, and existing Python test.
Validation
cargo build --locked --offline --features capi -j1 --bin rustpythonpassed.crates/capi:cargo clippy --offline --tests -j1 -- -D warningspassed.-Wall -Wextra -Werror, calls the exported symbol through the existing native loader. All eleven required dynamic symbols were verified before loading.TestCAPI.test_cfunction_callassertion body and six supplemental Python checks: empty keywords, a builtin callable, return identity, exception identity, non-callable rejection, and a subsequent successful call. All behavior assertions are in Python; no new Rust behavior tests or Rust-embedded Python tests were added.Coverage boundary: this was direct invocation of the existing canonical method body, not a claim that the skipped canonical unittest class ran through the suite. The installed CPython 3.14.7 distribution lacks
_testcapi, so reference runtime execution was unavailable; the exact tagged implementation and canonical assertions were audited. Full workspace tests, cross-platform ABI checks, and the hosted CI matrix are not claimed as local passes. The temporary native fixture is not committed, and existing canonical skips/assertions remain unchanged.