try:
    import pymysql
except ImportError:  # pragma: no cover - optional fallback when mysqlclient is unavailable
    pymysql = None
else:  # pragma: no cover - import side effect
    # Django 5's MySQL backend checks the mysqlclient version string during import.
    # PyMySQL exposes a legacy compatibility version, so override it before installing
    # the MySQLdb shim.
    pymysql.version_info = (2, 2, 1, "final", 0)
    pymysql.__version__ = "2.2.1"
    pymysql.install_as_MySQLdb()

try:
    from .celery import app as celery_app
except ImportError:  # pragma: no cover - fallback for test environments
    celery_app = None

__all__ = ("celery_app",)
