# Path: src/concurrency/compat.py



import warnings
from django.core.exceptions import ImproperlyConfigured
from django.test.signals import setting_changed
from django.utils.module_loading import import_string
from .compat import get_callable
        from django.conf import settings
            'postgresql': "concurrency.triggers.PostgreSQL",
            'mysql': "concurrency.triggers.MySQL",
            'sqlite3': "concurrency.triggers.Sqlite3",
            'sqlite': "concurrency.triggers.Sqlite3",
        }
    }

    def __init__(self, prefix):
        """
        Loads our settings from django.conf.settings, applying defaults for any
        that are omitted.
        """
        self.prefix = prefix

        for name, default in self.defaults.items():
            prefix_name = (self.prefix + '_' + name).upper()
            value = getattr(settings, prefix_name, default)
            self._set_attr(prefix_name, value)
            setattr(settings, prefix_name, value)
            setting_changed.send(self.__class__, setting=prefix_name, value=value, enter=True)

        setting_changed.connect(self._handler)

    def _set_attr(self, prefix_name, value):
        name = prefix_name[len(self.prefix) + 1:]
        if name == 'IGNORE_DEFAULT':
            raise ImproperlyConfigured('IGNORE_DEFAULT has been removed in django-concurrency 1.5. '
                                       'Use VERSION_FIELD_REQUIRED instead')
        elif name == 'CALLBACK':
            if isinstance(value, str):

# Path: src/concurrency/compat.py



# Path: src/concurrency/config.py
import warnings
from django.core.exceptions import ImproperlyConfigured
from django.test.signals import setting_changed
from django.utils.module_loading import import_string
from .compat import get_callable
        from django.conf import settings

            'postgresql': "concurrency.triggers.PostgreSQL",
            'mysql': "concurrency.triggers.MySQL",
            'sqlite3': "concurrency.triggers.Sqlite3",
            'sqlite': "concurrency.triggers.Sqlite3",
        }
    }

    def __init__(self, prefix):
        """
        Loads our settings from django.conf.settings, applying defaults for any
        that are omitted.
        """
        self.prefix = prefix

        for name, default in self.defaults.items():
            prefix_name = (self.prefix + '_' + name).upper()
            value = getattr(settings, prefix_name, default)
            self._set_attr(prefix_name, value)
            setattr(settings, prefix_name, value)
            setting_changed.send(self.__class__, setting=prefix_name, value=value, enter=True)

        setting_changed.connect(self._handler)

    def _set_attr(self, prefix_name, value):
        name = prefix_name[len(self.prefix) + 1:]
        if name == 'IGNORE_DEFAULT':
            raise ImproperlyConfigured('IGNORE_DEFAULT has been removed in django-concurrency 1.5. '
                                       'Use VERSION_FIELD_REQUIRED instead')
        elif name == 'CALLBACK':
            if isinstance(value, str):

                func = get_callable(value)