bpo-46764: Fix wrapping bound method with @classmethod (#31367)

This commit is contained in:
Michael J. Sullivan 2022-05-04 21:00:21 -07:00 committed by GitHub
parent d1b2e989be
commit a918589578
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 11 additions and 8 deletions

View file

@ -321,13 +321,6 @@ method_traverse(PyMethodObject *im, visitproc visit, void *arg)
return 0;
}
static PyObject *
method_descr_get(PyObject *meth, PyObject *obj, PyObject *cls)
{
Py_INCREF(meth);
return meth;
}
PyTypeObject PyMethod_Type = {
PyVarObject_HEAD_INIT(&PyType_Type, 0)
.tp_name = "method",
@ -348,7 +341,6 @@ PyTypeObject PyMethod_Type = {
.tp_methods = method_methods,
.tp_members = method_memberlist,
.tp_getset = method_getset,
.tp_descr_get = method_descr_get,
.tp_new = method_new,
};