[entities, view] delete dead code
The auto_unwrap_bw_compat metaclass calls unwrap_adapter_compat, which
was removed in changeset 697a8181ba30 "remove 3.9 bw compat". So this
can't possibly work anymore, meaning we can get rid of it.
--- a/entities/adapters.py Fri Jul 04 14:37:08 2014 +0200
+++ b/entities/adapters.py Tue Jul 08 10:34:50 2014 +0200
@@ -367,15 +367,3 @@
globalmsg = _('some relations violate a unicity constraint')
rtypes_msg['unicity constraint'] = globalmsg
raise ValidationError(self.entity.eid, rtypes_msg)
-
-# deprecated ###################################################################
-
-
-class adapter_deprecated(view.auto_unwrap_bw_compat):
- """metaclass to print a warning on instantiation of a deprecated class"""
-
- def __call__(cls, *args, **kwargs):
- msg = getattr(cls, "__deprecation_warning__",
- "%(cls)s is deprecated") % {'cls': cls.__name__}
- warn(msg, DeprecationWarning, stacklevel=2)
- return type.__call__(cls, *args, **kwargs)
--- a/view.py Fri Jul 04 14:37:08 2014 +0200
+++ b/view.py Tue Jul 08 10:34:50 2014 +0200
@@ -558,14 +558,6 @@
__registry__ = 'adapters'
-class auto_unwrap_bw_compat(type):
- def __new__(mcs, name, bases, classdict):
- cls = type.__new__(mcs, name, bases, classdict)
- if not classdict.get('__needs_bw_compat__'):
- unwrap_adapter_compat(cls)
- return cls
-
-
class EntityAdapter(Adapter):
"""base class for entity adapters (eg adapt an entity to an interface)"""
def __init__(self, _cw, **kwargs):