summaryrefslogtreecommitdiffstats
path: root/Mac/Modules/dlg
diff options
context:
space:
mode:
authorBarry Warsaw <barry@python.org>2002-04-23 22:45:44 (GMT)
committerBarry Warsaw <barry@python.org>2002-04-23 22:45:44 (GMT)
commitf16951cffe9e4171769213bbe1aecec3d8f5200a (patch)
tree65880c11281cc4b26c89a05c0ad134da17280d30 /Mac/Modules/dlg
parent3adf8d1daef8d323c405fd157e40cbae1d636c23 (diff)
downloadcpython-f16951cffe9e4171769213bbe1aecec3d8f5200a.zip
cpython-f16951cffe9e4171769213bbe1aecec3d8f5200a.tar.gz
cpython-f16951cffe9e4171769213bbe1aecec3d8f5200a.tar.bz2
abstract_get_bases(): Clarify exactly what the return values and
states can be for this function, and ensure that only AttributeErrors are masked. Any other exception raised via the equivalent of getattr(cls, '__bases__') should be propagated up. abstract_issubclass(): If abstract_get_bases() returns NULL, we must call PyErr_Occurred() to see if an exception is being propagated, and return -1 or 0 as appropriate. This is the specific fix for a problem whereby if getattr(derived, '__bases__') raised an exception, an "undetected error" would occur (under a debug build). This nasty situation was uncovered when writing a security proxy extension type for the Zope3 project, where the security proxy raised a Forbidden exception on getattr of __bases__. PyObject_IsInstance(), PyObject_IsSubclass(): After both calls to abstract_get_bases(), where we're setting the TypeError if the return value is NULL, we must first check to see if an exception occurred, and /not/ mask an existing exception. Neil Schemenauer should double check that these changes don't break his ExtensionClass examples (there aren't any test cases for those examples and abstract_get_bases() was added by him in response to problems with ExtensionClass). Neil, please add test cases if possible! I belive this is a bug fix candidate for Python 2.2.2.
Diffstat (limited to 'Mac/Modules/dlg')
0 files changed, 0 insertions, 0 deletions