# HG changeset patch # User Julien Cristau # Date 1404808490 -7200 # Node ID 228c3571e22227d1af55681ed93f24cab6dad382 # Parent a98e60464c2638d0ef51601ee1f795eb3da846f1 [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. diff -r a98e60464c26 -r 228c3571e222 entities/adapters.py --- 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) diff -r a98e60464c26 -r 228c3571e222 view.py --- 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):