Commit dc7f7cf7 authored by Tres Seaver's avatar Tres Seaver

Optimize further by letting isinstance do the heavy lifting in C.

Also makes the intent clearer.
parent 888831d5
......@@ -59,12 +59,7 @@ def maybeWarnDeprecated(ob, method_name):
if getattr(getattr(ob, method_name), '__five_method__', False):
# Method knows it's deprecated
return
ob_type = type(ob)
# Quick check for directly deprecated classes
if ob_type in deprecatedManageAddDeleteClasses:
return
if any(issubclass(ob_type, cls)
for cls in deprecatedManageAddDeleteClasses):
if isinstance(ob, tuple(deprecatedManageAddDeleteClasses)):
return
class_ = ob.__class__
LOG.debug(
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment