diff --git a/oslo_db/sqlalchemy/enginefacade.py b/oslo_db/sqlalchemy/enginefacade.py index c21f39a4..056dd31f 100644 --- a/oslo_db/sqlalchemy/enginefacade.py +++ b/oslo_db/sqlalchemy/enginefacade.py @@ -18,7 +18,6 @@ import threading import warnings from oslo_config import cfg -from oslo_context import context as oslo_context from oslo_db import exception from oslo_db import options @@ -778,10 +777,6 @@ def transaction_context_provider(klass): return klass -# apply the context descriptors to oslo.context.RequestContext -transaction_context_provider(oslo_context.RequestContext) - - _context_manager = _TransactionContextManager(_is_global_manager=True) """default context manager.""" diff --git a/oslo_db/tests/sqlalchemy/test_enginefacade.py b/oslo_db/tests/sqlalchemy/test_enginefacade.py index a222565e..a463c7b6 100644 --- a/oslo_db/tests/sqlalchemy/test_enginefacade.py +++ b/oslo_db/tests/sqlalchemy/test_enginefacade.py @@ -35,6 +35,9 @@ from oslo_db.sqlalchemy import orm from oslo_db.sqlalchemy import test_base +enginefacade.transaction_context_provider(oslo_context.RequestContext) + + class SingletonOnName(mock.MagicMock): def __init__(self, the_name, **kw): super(SingletonOnName, self).__init__(