diff options
author | Jason Madden <jamadden@gmail.com> | 2020-03-19 07:36:50 -0500 |
---|---|---|
committer | Jason Madden <jamadden@gmail.com> | 2020-03-19 07:36:50 -0500 |
commit | 04152ae7d2687bc7f100f4f504a342e84fc5c167 (patch) | |
tree | 86eafb004bcf13e270d129e7c632329305919b66 | |
parent | 42c5ad2d4f88610bb89d35152c1caa1c52dc6927 (diff) | |
download | zope-interface-04152ae7d2687bc7f100f4f504a342e84fc5c167.tar.gz |
Another comment update, referencing #163
-rw-r--r-- | src/zope/interface/interface.py | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/zope/interface/interface.py b/src/zope/interface/interface.py index e83b512..e654b27 100644 --- a/src/zope/interface/interface.py +++ b/src/zope/interface/interface.py @@ -276,8 +276,13 @@ class InterfaceBase(NameAndModuleComparisonMixin, SpecificationBasePy): """ 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: |