Repository navigation
Mark wrapper descriptors as method descriptors - #9286
Conversation
Match CPython 3.15 wrapper_descriptor flags so existing method lookup can use the descriptor's direct receiver-prepending dispatch path. Assisted-by: OpenAI Codex:model-version-unavailable
|
Note Currently processing new changes in this PR. This may take a few minutes, please wait... ⚙️ Run configuration
⛔ Files ignored due to path filters: 1
📒 Files selected for processing: 1
✨ 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 |
Merging this PR will not alter performance
Comparing Footnotes
|
Regenerate test_monitoring from pinned CPython 3.15.0 with the updater, preserving every other adaptation. The METHOD_DESCRIPTOR flag now supplies the canonical receiver in int.__repr__ CALL/C_RETURN events. Assisted-by: OpenAI Codex:model-version-unavailable
📦 Library DependenciesThe following Lib/ modules were modified. Here are their dependencies: [x] test: cpython/Lib/test/test_monitoring.py (TODO: 2) dependencies: dependent tests: (no tests depend on monitoring) Legend:
|
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. |
Summary
Mark
wrapper_descriptorasMETHOD_DESCRIPTOR, matching CPython 3.15.0. This is the isolated descriptor-flag hunk from the Python 3.15 upgrade work, not the wrapper lifetime/GC changes tracked separately in #8944.The flag allows existing method lookup paths to retain the descriptor and prepend the receiver rather than allocate a bound wrapper. The existing direct, bound and vectorcall paths already perform the same receiver validation and slot argument dispatch. The only Lib change removes one obsolete RustPython expected-failure marker from
test_monitoring.TestLoadSuperAttr.test_vs_other_type_call, regenerated throughupdate_libfrom pinned CPython 3.15.0. All canonical assertions and other local adaptations are preserved.Validation
freeze-stdlibpassed. All 3,631 tracked source/symlink hashes matched before and after the build.test_descr.OperatorsTest.test_listsandtest_descr.ClassPropertiesAndMethods.test_pow_wrapper_error_messages.test_callfailed on baseline and passed on candidate and CPython. This is an external observation, not execution of the CAPI-dependent enclosing test or canonical-suite coverage.These narrow controls do not establish correctness of every optimized dispatch path or a performance improvement. Full workspace/CAPI runtime gates and the release-mode whole-module command have not been run locally and remain outstanding; actual hosted executed steps will be tracked separately. The full CAPI-dependent method and whole test modules were not executed locally.
Monitoring CI repair
The original head
0af373cffailed hosted Ubuntu tests because the now-correcttest_vs_other_type_callunexpectedly succeeded, including the workflow's built-in rerun. On the exact unchanged canonical selector, the sealed main baseline fails becauseint.__repr__CALL/C_RETURN events reportMISSINGinstead of receiver0; the sealed candidate and pinned CPython both pass with zero skips. The updater-generated correction at87db988cremoves exactly that expected-failure decorator, with no native change or assertion weakening. All three local runs used the fixed 15-second / 512 MiB sampled-RSS guard; normal hooks passed. These are one-selector results, not a local full-module or full-suite claim. Fresh hosted CI is pending.AI assistance
This change and its source review/validation were prepared with OpenAI Codex assistance. No human review is claimed by this disclosure.
Performance qualification for measured head
0af373cfCodSpeed executed the benchmark and reported a passing gate, but
comprehension_list.pyincreased from 803.995 to 891.509 µs (−9.8164% efficiency). The report exposesRELATIVEdetection,allowedRegression=0.1,confidenceLevel=0.99, and no benchmark-specific override. ItsNoChangeclassification therefore does not establish equal performance.The comparison uses main
bcfad3554ef66264d08c2d030d1fa13aaab5c03cand PR head0af373cff4c5b603a3d723f28d3fcb5ba8f6c5e8, tested as merge8c101451f39dd8d8e18c4bf393c0ed6f73aded0c. Both named environment fingerprints areffdf350d53eb784b, but the baseline job used kernel7.0.0-1017-azureand runner image20261018.339.1, whereas the head used kernel6.17.0-1022-azureand image20261012.334.1. Both used CodSpeed runner 5.4.2. This is not a fully matched-environment comparison and does not establish a cause. Four other benchmarks were skipped with baseline results reused.