class deprecated_base_class(framework_meta):

    def __new__(meta, name, bases, attrs):
        for b in bases:
            if isinstance(b, deprecated_base_class):
                warning = getattr(b, '__deprecation_warning__',
                    '%(class)s is deprecated')
warn(warning % {'class': b.__name__}, DeprecationWarning, stacklevel=2)
Deprecate usage of a class as a parent class in Python