From 04152ae7d2687bc7f100f4f504a342e84fc5c167 Mon Sep 17 00:00:00 2001 From: Jason Madden Date: Thu, 19 Mar 2020 07:36:50 -0500 Subject: [PATCH] Another comment update, referencing #163 --- src/zope/interface/interface.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/zope/interface/interface.py b/src/zope/interface/interface.py index e83b5128..e654b275 100644 --- a/src/zope/interface/interface.py +++ b/src/zope/interface/interface.py @@ -276,8 +276,13 @@ def __call__(self, obj, alternate=_marker): """ try: conform = getattr(obj, '__conform__', None) - # XXX: Do we really want to catch BaseException? Shouldn't - # things like MemoryError, KeyboardInterrupt, etc, get through? + # XXX: Ideally, we don't want to catch BaseException. Things + # like MemoryError, KeyboardInterrupt, and other BaseExceptions should + # get through. Here, and everywhere we have bare ``except:`` clauses. + # The bare ``except:`` clauses exist for compatibility with the C code in + # ``_zope_interface_coptimizations.c`` (``ib_call()`` in this case). Both + # implementations would need to change. But beware of things like proxies and + # Acquisition wrappers. See https://github.com/zopefoundation/zope.interface/issues/163 except: # pylint:disable=bare-except conform = None if conform is not None: