def transaction_context_provider(klass):

    setattr(
        klass,
        'transaction_ctx',
        property(_transaction_ctx_for_context))

    # Graft transaction context attributes as context properties
    for attr in ('session', 'connection', 'transaction'):
        setattr(klass, attr, _context_descriptor(attr))

    return klass
Save L{util.initgroups} calls in C{self.initgroupsCalls}.
dataset/ETHPy150Open openstack/oslo.db/oslo_db/sqlalchemy/enginefacade.py/transaction_context_provider--crossover with--dataset/ETHPy150Open nlloyd/SubliminalCollaborator/libs/twisted/python/test/test_util.py/SwitchUIDTest.initgroups