mirror of
https://github.com/python/cpython.git
synced 2025-07-09 20:35:26 +00:00
gh-106917: fix super classmethod calls to non-classmethods (#106977)
This commit is contained in:
parent
b383703491
commit
e5d5522612
5 changed files with 51 additions and 5 deletions
2
Python/executor_cases.c.h
generated
2
Python/executor_cases.c.h
generated
|
@ -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) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue