Mark wrapper descriptors as method descriptors (#9286)

* Mark wrapper descriptors as method descriptors

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

* Retire fixed wrapper monitoring expected failure

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
This commit is contained in:
youknowdot authored and GitHub committed 2026-10-22 10:15:53 +09:00
1 parent 5b2f898887
commit 3b87cbe559
2 files changed
+1 -2

No files matched your search

-1
View File
@@ -2333,7 +2333,6 @@ class TestLoadSuperAttr(CheckEvents):
self.check_events(nonopt_func, recorders=self.RECORDERS, expected=nonopt_expected)
self.check_events(opt_func, recorders=self.RECORDERS, expected=opt_expected)
@unittest.expectedFailure # TODO: RUSTPYTHON; line number differences in multi-line super() calls
def test_vs_other_type_call(self):
code_template = textwrap.dedent("""
class C:
+1 -1
View File
@@ -2057,7 +2057,7 @@ impl Callable for PyWrapper {
#[pyclass(
with(GetDescriptor, Callable, Representable),
flags(DISALLOW_INSTANTIATION)
flags(DISALLOW_INSTANTIATION, METHOD_DESCRIPTOR)
)]
impl Py<PyWrapper> {
#[pymethod]