# Path: oslo_db/api.py
# LOG = logging.getLogger(__name__)
# def safe_for_db_retry(f):
# def retry_on_deadlock(f):
# def retry_on_request(f):
#     def __init__(self, retry_interval=1, max_retries=20,
#                  inc_retry_interval=True,
#                  max_retry_interval=10, retry_on_disconnect=False,
#                  retry_on_deadlock=False,
#                  exception_checker=lambda exc: False,
#                  jitter=False):
#     def __call__(self, f):
#         def wrapper(*args, **kwargs):
#     def _is_exception_expected(self, exc):
#     def _get_inc_interval(self, n, jitter):
#     def __init__(self, backend_name, backend_mapping=None, lazy=False,
#                  **kwargs):
#     def _load_backend(self):
#     def __getattr__(self, key):
#     def from_config(cls, conf, backend_mapping=None, lazy=False):
# class wrap_db_retry(object):
# class DBAPI(object):


import copy
import logging
import threading
from debtcollector import removals
from oslo_config import cfg
from oslo_db import api
                            from eventlet import tpool
]

_removed_msg = (
    'Thread pool support in oslo_db is deprecated; you should use '
    'oslo_db.api.DBAPI.from_config directly'
)


@removals.removed_class(
    'TpoolDbapiWrapper', message=_removed_msg, version='10.0.0')
class TpoolDbapiWrapper(object):
    """DB API wrapper class.

    This wraps the oslo DB API with an option to be able to use eventlet's
    thread pooling. Since the CONF variable may not be loaded at the time
    this class is instantiated, we must look at it on the first DB API call.
    """

    def __init__(self, conf, backend_mapping):
        self._db_api = None
        self._backend_mapping = backend_mapping
        self._conf = conf
        self._conf.register_opts(tpool_opts, 'database')
        self._lock = threading.Lock()

    @property
    def _api(self):
        if not self._db_api:
            with self._lock:
                if not self._db_api:

# Path: oslo_db/api.py
# LOG = logging.getLogger(__name__)
# def safe_for_db_retry(f):
# def retry_on_deadlock(f):
# def retry_on_request(f):
#     def __init__(self, retry_interval=1, max_retries=20,
#                  inc_retry_interval=True,
#                  max_retry_interval=10, retry_on_disconnect=False,
#                  retry_on_deadlock=False,
#                  exception_checker=lambda exc: False,
#                  jitter=False):
#     def __call__(self, f):
#         def wrapper(*args, **kwargs):
#     def _is_exception_expected(self, exc):
#     def _get_inc_interval(self, n, jitter):
#     def __init__(self, backend_name, backend_mapping=None, lazy=False,
#                  **kwargs):
#     def _load_backend(self):
#     def __getattr__(self, key):
#     def from_config(cls, conf, backend_mapping=None, lazy=False):
# class wrap_db_retry(object):
# class DBAPI(object):


# Path: oslo_db/concurrency.py
import copy
import logging
import threading
from debtcollector import removals
from oslo_config import cfg
from oslo_db import api
                            from eventlet import tpool

]

_removed_msg = (
    'Thread pool support in oslo_db is deprecated; you should use '
    'oslo_db.api.DBAPI.from_config directly'
)


@removals.removed_class(
    'TpoolDbapiWrapper', message=_removed_msg, version='10.0.0')
class TpoolDbapiWrapper(object):
    """DB API wrapper class.

    This wraps the oslo DB API with an option to be able to use eventlet's
    thread pooling. Since the CONF variable may not be loaded at the time
    this class is instantiated, we must look at it on the first DB API call.
    """

    def __init__(self, conf, backend_mapping):
        self._db_api = None
        self._backend_mapping = backend_mapping
        self._conf = conf
        self._conf.register_opts(tpool_opts, 'database')
        self._lock = threading.Lock()

    @property
    def _api(self):
        if not self._db_api:
            with self._lock:
                if not self._db_api:

                    db_api = api.DBAPI.from_config(