summaryrefslogtreecommitdiff
path: root/lib/sqlalchemy/dialects/mysql/mariadbconnector.py
diff options
context:
space:
mode:
authorMike Bayer <mike_mp@zzzcomputing.com>2022-01-20 15:21:17 -0500
committerMike Bayer <mike_mp@zzzcomputing.com>2022-01-20 17:59:31 -0500
commit469f7fd2f3d51796904cde63dfcc2aafe5663087 (patch)
treec7224e2cd0af2b58589ec863352e277604562644 /lib/sqlalchemy/dialects/mysql/mariadbconnector.py
parentc6b15e443e0cfc7a09eb24c37123a595fdb639ca (diff)
downloadsqlalchemy-469f7fd2f3d51796904cde63dfcc2aafe5663087.tar.gz
re-enable tests for asyncmy; fix Binary
Fixed regression in asyncmy dialect caused by :ticket:`7567` where removal of the PyMySQL dependency broke binary columns, due to the asyncmy dialect not being properly included within CI tests. Also repairs mariadbconnector isolation level for 2.0. basically tox config was failing to include additional drivers. Fixes: #7593 Change-Id: Iefc1061c24c75fcb9ca1a02d0b5e5f43970ade17
Diffstat (limited to 'lib/sqlalchemy/dialects/mysql/mariadbconnector.py')
-rw-r--r--lib/sqlalchemy/dialects/mysql/mariadbconnector.py11
1 files changed, 5 insertions, 6 deletions
diff --git a/lib/sqlalchemy/dialects/mysql/mariadbconnector.py b/lib/sqlalchemy/dialects/mysql/mariadbconnector.py
index f31304887..ea6060c01 100644
--- a/lib/sqlalchemy/dialects/mysql/mariadbconnector.py
+++ b/lib/sqlalchemy/dialects/mysql/mariadbconnector.py
@@ -163,22 +163,21 @@ class MySQLDialect_mariadbconnector(MySQLDialect):
def _detect_charset(self, connection):
return "utf8mb4"
- _isolation_lookup = set(
- [
+ def get_isolation_level_values(self, dbapi_connection):
+ return (
"SERIALIZABLE",
"READ UNCOMMITTED",
"READ COMMITTED",
"REPEATABLE READ",
"AUTOCOMMIT",
- ]
- )
+ )
- def _set_isolation_level(self, connection, level):
+ def set_isolation_level(self, connection, level):
if level == "AUTOCOMMIT":
connection.autocommit = True
else:
connection.autocommit = False
- super(MySQLDialect_mariadbconnector, self)._set_isolation_level(
+ super(MySQLDialect_mariadbconnector, self).set_isolation_level(
connection, level
)