"""
Django's MySQL backend imports `MySQLdb`, which is the C extension
`mysqlclient` — and this project deploys PyMySQL instead, because a cPanel
box has no compiler for the C one. PyMySQL ships a drop-in shim, but it does
nothing until something calls it, and nothing did: `requirements.txt` pinned
PyMySQL while `django.db.backends.mysql` raised ImproperlyConfigured on every
connection.

This package is imported before settings are read, which makes it the one
place the shim is guaranteed to run first.

PyMySQL's shim also reports a HARDCODED version_info of (1, 4, 6) for
`MySQLdb.version_info`, regardless of which PyMySQL version is actually
installed — it is a compatibility claim, not the package version. Django 6.0's
MySQL backend requires mysqlclient >= 2.2.1 and reads that same attribute, so
without overriding it every connection raises ImproperlyConfigured even though
PyMySQL works fine as a driver.
"""

import pymysql

pymysql.install_as_MySQLdb()
pymysql.version_info = (2, 2, 4, 'final', 0)
