[Python-checkins] cpython: Add a separate NEWS entry for a change to PyObject_CallMethod in the PEP 380

nick.coghlan python-checkins at python.org
Sat Jan 14 07:45:58 CET 2012


http://hg.python.org/cpython/rev/cfab2b2009e4
changeset:   74379:cfab2b2009e4
user:        Nick Coghlan <ncoghlan at gmail.com>
date:        Sat Jan 14 16:45:48 2012 +1000
summary:
  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

files:
  Misc/NEWS          |  3 +++
  Objects/abstract.c |  2 --
  2 files changed, 3 insertions(+), 2 deletions(-)


diff --git a/Misc/NEWS b/Misc/NEWS
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -2449,6 +2449,9 @@
 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
--- a/Objects/abstract.c
+++ b/Objects/abstract.c
@@ -2288,7 +2288,6 @@
 
     func = _PyObject_GetAttrId(o, name);
     if (func == NULL) {
-        PyErr_SetString(PyExc_AttributeError, name->string);
         return 0;
     }
 
@@ -2330,7 +2329,6 @@
 
     func = _PyObject_GetAttrId(o, name);
     if (func == NULL) {
-        PyErr_SetString(PyExc_AttributeError, name->string);
         return NULL;
     }
     va_start(va, format);

-- 
Repository URL: http://hg.python.org/cpython


More information about the Python-checkins mailing list