gh-106521: Remove _PyObject_LookupAttr() function (GH-106642)

This commit is contained in:
Serhiy Storchaka 2023-07-12 08:57:10 +03:00 committed by GitHub
parent e8ab0096a5
commit be1b968dc1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
45 changed files with 351 additions and 352 deletions

View file

@ -943,7 +943,7 @@ static int
functools_copy_attr(PyObject *wrapper, PyObject *wrapped, PyObject *name)
{
PyObject *value;
int res = _PyObject_LookupAttr(wrapped, name, &value);
int res = PyObject_GetOptionalAttr(wrapped, name, &value);
if (value != NULL) {
res = PyObject_SetAttr(wrapper, name, value);
Py_DECREF(value);