gh-106917: fix super classmethod calls to non-classmethods (#106977)

This commit is contained in:
Carl Meyer 2023-07-24 14:14:56 -06:00 committed by GitHub
parent b383703491
commit e5d5522612
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 51 additions and 5 deletions

View file

@ -1406,7 +1406,7 @@
PyTypeObject *cls = (PyTypeObject *)class;
int method_found = 0;
res2 = _PySuper_Lookup(cls, self, name,
cls->tp_getattro == PyObject_GenericGetAttr ? &method_found : NULL);
Py_TYPE(self)->tp_getattro == PyObject_GenericGetAttr ? &method_found : NULL);
Py_DECREF(global_super);
Py_DECREF(class);
if (res2 == NULL) {