summaryrefslogtreecommitdiff
path: root/lib/sqlalchemy/dialects/mysql/base.py
diff options
context:
space:
mode:
authorMike Bayer <mike_mp@zzzcomputing.com>2013-04-21 17:09:45 -0400
committerMike Bayer <mike_mp@zzzcomputing.com>2013-04-21 17:09:45 -0400
commit23c744b54e94a0d003a7e7236af7868cc31a1161 (patch)
treebdf0bf1708f30f34eb2db757040e00c1ecfda64f /lib/sqlalchemy/dialects/mysql/base.py
parentd5af821b5d564141451f5534a0bb922508e89e70 (diff)
downloadsqlalchemy-23c744b54e94a0d003a7e7236af7868cc31a1161.tar.gz
- Improvements to the operation of the pymysql dialect on
Python 3, including some important decode/bytes steps. Issues remain with BLOB types due to driver issues. Courtesy Ben Trofatter. - start using util.py3k, we will eventually remove the sa2to3 fixer entirely
Diffstat (limited to 'lib/sqlalchemy/dialects/mysql/base.py')
-rw-r--r--lib/sqlalchemy/dialects/mysql/base.py7
1 files changed, 2 insertions, 5 deletions
diff --git a/lib/sqlalchemy/dialects/mysql/base.py b/lib/sqlalchemy/dialects/mysql/base.py
index 4888398d9..b55bc1090 100644
--- a/lib/sqlalchemy/dialects/mysql/base.py
+++ b/lib/sqlalchemy/dialects/mysql/base.py
@@ -1932,11 +1932,8 @@ class MySQLDialect(default.DefaultDialect):
cursor.execute('SELECT @@tx_isolation')
val = cursor.fetchone()[0]
cursor.close()
- # Py3K
- #if isinstance(val, bytes):
- # val = val.decode()
- # Py2K
- # end Py2K
+ if util.py3k and isinstance(val, bytes):
+ val = val.decode()
return val.upper().replace("-", " ")
def do_commit(self, dbapi_connection):