

def transaction_context_provider(klass):
    'Decorate a class with ``session`` and ``connection`` attributes.'
    setattr(klass, 'transaction_ctx', property(_transaction_ctx_for_context))
    for attr in ('session', 'connection', 'transaction'):
        setattr(klass, attr, _context_descriptor(attr))
    return klass

dataset/ETHPy150Open openstack/oslo.db/oslo_db/sqlalchemy/enginefacade.py transaction_context_provider/original