gh-106521: Add PyObject_GetOptionalAttr() function by serhiy-storchaka · Pull Request #106522 · python/cpython
requested review from
1st1,
abalkin,
asvetlov,
berkerpeksag,
brettcannon,
ericsnowcurrently,
erlend-aasland,
gvanrossum,
iritkatriel,
isidentical,
kumaraditya303,
markshannon,
methane,
ncoghlan,
pganssle,
rhettinger,
warsaw and
willingc
as code owners
serhiy-storchaka
requested review from
vstinner
and removed request for
1st1,
abalkin,
asvetlov,
berkerpeksag,
encukou,
ericsnowcurrently,
gvanrossum,
iritkatriel,
markshannon,
methane,
ncoghlan,
pganssle,
warsaw and
willingc
serhiy-storchaka added a commit to serhiy-storchaka/cpython that referenced this pull request
hauntsaninja pushed a commit to python/mypy that referenced this pull request
`_PyObject_LookupAttrId` was removed / replaced with `PyObject_GetOptionalAttrString` in python/cpython#106522. https://docs.python.org/dev/c-api/object.html#c.PyObject_GetOptionalAttrString Fixes ```cpp /home/runner/work/mypy/mypy/mypyc/lib-rt/pythonsupport.h: In function ‘update_bases’: (diff) /home/runner/work/mypy/mypy/mypyc/lib-rt/pythonsupport.h:51:13: error: implicit declaration of function ‘_PyObject_LookupAttrId’; did you mean ‘_PyObject_GetAttrId’? [-Werror=implicit-function-declaration] (diff) 51 | if (_PyObject_LookupAttrId(base, &PyId___mro_entries__, &meth) < 0) { (diff) | ^~~~~~~~~~~~~~~~~~~~~~ (diff) | _PyObject_GetAttrId (diff) ```