-import threading, pickle
+import threading, pickle, inspect
from . import db, index, cache
from .db import txnfun
def storedescs(obj):
t = type(obj)
- ret = getattr(t, "__didex_attr", None)
+ ret = t.__dict__.get("__didex_attr")
if ret is None:
ret = []
- for nm, val in t.__dict__.items():
- if isinstance(val, storedesc):
- ret.append((nm, val))
- t.__didex_attr = ret
+ for st in inspect.getmro(t):
+ for nm, val in st.__dict__.items():
+ if isinstance(val, storedesc):
+ ret.append((nm, val))
+ t.__dict__["__didex_attr"] = ret
return ret
class datastore(object):