From: Nick Coghlan Date: Sat, 14 Jan 2012 06:45:48 +0000 (+1000) Subject: Add a separate NEWS entry for a change to PyObject_CallMethod in the PEP 380 patch... X-Git-Tag: v3.3.0a1~416 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=138f4656e38f656afa7436c306aa74f1d4941216;p=python Add a separate NEWS entry for a change to PyObject_CallMethod in the PEP 380 patch, and make the private CallMethod variants consistent with the public one --- diff --git a/Misc/NEWS b/Misc/NEWS index d3930ed06e..6531ddd51f 100644 --- a/Misc/NEWS +++ b/Misc/NEWS @@ -2449,6 +2449,9 @@ Library C-API ----- +- PyObject_CallMethod now passes along any underlying AttributeError from + PyObject_GetAttr, instead of replacing it with something less informative + - Issue #10913: Deprecate misleading functions PyEval_AcquireLock() and PyEval_ReleaseLock(). The thread-state aware APIs should be used instead. diff --git a/Objects/abstract.c b/Objects/abstract.c index 4d73a3b534..be568c695a 100644 --- a/Objects/abstract.c +++ b/Objects/abstract.c @@ -2288,7 +2288,6 @@ _PyObject_CallMethodId(PyObject *o, _Py_Identifier *name, char *format, ...) func = _PyObject_GetAttrId(o, name); if (func == NULL) { - PyErr_SetString(PyExc_AttributeError, name->string); return 0; } @@ -2330,7 +2329,6 @@ _PyObject_CallMethodId_SizeT(PyObject *o, _Py_Identifier *name, char *format, .. func = _PyObject_GetAttrId(o, name); if (func == NULL) { - PyErr_SetString(PyExc_AttributeError, name->string); return NULL; } va_start(va, format);