'return an iterator of all classbound attributes that are
implement :class:`._InspectionAttr`.
This includes :class:`.QueryableAttribute` as well as extension
types such as :class:`.hybrid_property` and :class:`.AssociationProxy`.'

def _all_sqla_attributes(self, exclude=None):

    if (exclude is None):
        exclude = set()
    for supercls in self.class_.__mro__:
        for key in set(supercls.__dict__).difference(exclude):
            exclude.add(key)
            val = supercls.__dict__[key]
            if isinstance(val, interfaces._InspectionAttr):
                (yield (key, val))
