mirror of
https://github.com/python/cpython.git
synced 2025-08-04 00:48:58 +00:00
[3.12] gh-106917: fix super classmethod calls to non-classmethods (GH-106977). (#107204)
(cherry picked from commit e5d5522612
)
This commit is contained in:
parent
3923639a77
commit
5fd028b677
4 changed files with 50 additions and 4 deletions
|
@ -1663,7 +1663,7 @@ dummy_func(
|
|||
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) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue