diff --git a/dj_db_conn_pool/backends/jdbc/mixins.py b/dj_db_conn_pool/backends/jdbc/mixins.py index b58eb4c..fa886a6 100644 --- a/dj_db_conn_pool/backends/jdbc/mixins.py +++ b/dj_db_conn_pool/backends/jdbc/mixins.py @@ -5,7 +5,7 @@ import jpype.dbapi2 from dj_db_conn_pool.backends.jdbc.utils import CursorWrapper -from dj_db_conn_pool.core.mixins import PersistentDatabaseWrapperMixin +from dj_db_conn_pool.core.mixins import DatabasePoolWrapperMixin logger = logging.getLogger(__name__) @@ -22,7 +22,7 @@ def do_ping(self, dbapi_connection): return False -class JDBCDatabaseWrapperMixin(PersistentDatabaseWrapperMixin): +class JDBCDatabaseWrapperMixin(DatabasePoolWrapperMixin): Database = jpype.dbapi2 @property diff --git a/dj_db_conn_pool/backends/mysql/base.py b/dj_db_conn_pool/backends/mysql/base.py index cdb2a4e..285c089 100644 --- a/dj_db_conn_pool/backends/mysql/base.py +++ b/dj_db_conn_pool/backends/mysql/base.py @@ -3,12 +3,12 @@ from django.db.backends.mysql import base from sqlalchemy.dialects.mysql.mysqldb import MySQLDialect_mysqldb as MySQLDialect -from dj_db_conn_pool.core.mixins import PersistentDatabaseWrapperMixin +from dj_db_conn_pool.core.mixins import DatabasePoolWrapperMixin logger = logging.getLogger(__name__) -class DatabaseWrapper(PersistentDatabaseWrapperMixin, base.DatabaseWrapper): +class DatabaseWrapper(DatabasePoolWrapperMixin, base.DatabaseWrapper): class SQLAlchemyDialect(MySQLDialect): pass diff --git a/dj_db_conn_pool/backends/odbc/mixins.py b/dj_db_conn_pool/backends/odbc/mixins.py index 0913414..ab5a017 100644 --- a/dj_db_conn_pool/backends/odbc/mixins.py +++ b/dj_db_conn_pool/backends/odbc/mixins.py @@ -1,10 +1,10 @@ import pyodbc from django.conf import ImproperlyConfigured -from dj_db_conn_pool.core.mixins import PersistentDatabaseWrapperMixin +from dj_db_conn_pool.core.mixins import DatabasePoolWrapperMixin -class ODBCWrapperMixin(PersistentDatabaseWrapperMixin): +class ODBCDatabaseWrapperMixin(DatabasePoolWrapperMixin): def _get_new_connection(self, conn_params): try: driver = self.settings_dict['ODBC_OPTIONS']['DRIVER'] diff --git a/dj_db_conn_pool/backends/odbc/oceanbase/oracle/base.py b/dj_db_conn_pool/backends/odbc/oceanbase/oracle/base.py index 5dc30c0..cece248 100644 --- a/dj_db_conn_pool/backends/odbc/oceanbase/oracle/base.py +++ b/dj_db_conn_pool/backends/odbc/oceanbase/oracle/base.py @@ -1,10 +1,10 @@ from django.db.backends.oracle import base from sqlalchemy.dialects.oracle.base import OracleDialect -from dj_db_conn_pool.backends.odbc.mixins import ODBCWrapperMixin +from dj_db_conn_pool.backends.odbc.mixins import ODBCDatabaseWrapperMixin -class DatabaseWrapper(ODBCWrapperMixin, base.DatabaseWrapper): +class DatabaseWrapper(ODBCDatabaseWrapperMixin, base.DatabaseWrapper): class SQLAlchemyDialect(OracleDialect): pass diff --git a/dj_db_conn_pool/backends/oracle/base.py b/dj_db_conn_pool/backends/oracle/base.py index 8dd820c..7b3027a 100644 --- a/dj_db_conn_pool/backends/oracle/base.py +++ b/dj_db_conn_pool/backends/oracle/base.py @@ -1,10 +1,10 @@ from django.db.backends.oracle import base from sqlalchemy.dialects.oracle.base import OracleDialect -from dj_db_conn_pool.core.mixins import PersistentDatabaseWrapperMixin +from dj_db_conn_pool.core.mixins import DatabasePoolWrapperMixin -class DatabaseWrapper(PersistentDatabaseWrapperMixin, base.DatabaseWrapper): +class DatabaseWrapper(DatabasePoolWrapperMixin, base.DatabaseWrapper): class SQLAlchemyDialect(OracleDialect): pass diff --git a/dj_db_conn_pool/backends/postgresql/mixins.py b/dj_db_conn_pool/backends/postgresql/mixins.py index 8f1e540..8524db5 100644 --- a/dj_db_conn_pool/backends/postgresql/mixins.py +++ b/dj_db_conn_pool/backends/postgresql/mixins.py @@ -7,10 +7,10 @@ except ModuleNotFoundError: from sqlalchemy.dialects.postgresql.psycopg2 import PGDialect_psycopg2 as PGDialect -from dj_db_conn_pool.core.mixins import PersistentDatabaseWrapperMixin +from dj_db_conn_pool.core.mixins import DatabasePoolWrapperMixin -class PGDatabaseWrapperMixin(PersistentDatabaseWrapperMixin): +class PGDatabaseWrapperMixin(DatabasePoolWrapperMixin): class SQLAlchemyDialect(PGDialect): pass diff --git a/dj_db_conn_pool/core/base.py b/dj_db_conn_pool/core/base.py index 5b5d418..654f150 100644 --- a/dj_db_conn_pool/core/base.py +++ b/dj_db_conn_pool/core/base.py @@ -8,12 +8,12 @@ from django.db.backends.base.operations import BaseDatabaseOperations from sqlalchemy.engine.default import DefaultDialect -from dj_db_conn_pool.core.mixins.core import PersistentDatabaseWrapperMixin +from dj_db_conn_pool.core.mixins.core import DatabasePoolWrapperMixin logger = logging.getLogger(__name__) -class BaseDatabasePoolWrapper(PersistentDatabaseWrapperMixin, base.BaseDatabaseWrapper): +class BaseDatabasePoolWrapper(DatabasePoolWrapperMixin, base.BaseDatabaseWrapper): client_class = BaseDatabaseClient creation_class = BaseDatabaseCreation diff --git a/dj_db_conn_pool/core/mixins/__init__.py b/dj_db_conn_pool/core/mixins/__init__.py index e08a083..15c7e75 100644 --- a/dj_db_conn_pool/core/mixins/__init__.py +++ b/dj_db_conn_pool/core/mixins/__init__.py @@ -1 +1 @@ -from .core import PersistentDatabaseWrapperMixin +from .core import DatabasePoolWrapperMixin diff --git a/dj_db_conn_pool/core/mixins/core.py b/dj_db_conn_pool/core/mixins/core.py index e26b27e..40d853a 100644 --- a/dj_db_conn_pool/core/mixins/core.py +++ b/dj_db_conn_pool/core/mixins/core.py @@ -9,7 +9,7 @@ logger = logging.getLogger(__name__) -class PersistentDatabaseWrapperMixin: +class DatabasePoolWrapperMixin: def __init__(self, *args, **kwargs): # override creation_class self.creation_class = type('DatabaseCreationWrapper', (DatabaseCreationMixin, self.creation_class), {})