diff options
author | Ben Trofatter <trofatter@google.com> | 2013-03-18 17:58:41 -0700 |
---|---|---|
committer | Ben Trofatter <trofatter@google.com> | 2013-03-18 17:58:41 -0700 |
commit | 68299cbd444d4ba1c837b9407faedb5dc42f9d16 (patch) | |
tree | d4b2f372f14f12764258e0a1eb515bcd4dd11747 /lib/sqlalchemy/dialects/mysql/pymysql.py | |
parent | 9ad9ccec87b89023db611d70da2c6d455c29ab60 (diff) | |
download | sqlalchemy-68299cbd444d4ba1c837b9407faedb5dc42f9d16.tar.gz |
Added workaround for pymysql3 double wrapping ProgrammingErrors to pymysql dialect.
Added workaround for pymysql3 return a bytes object when queried for isolation level.
Diffstat (limited to 'lib/sqlalchemy/dialects/mysql/pymysql.py')
-rw-r--r-- | lib/sqlalchemy/dialects/mysql/pymysql.py | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/lib/sqlalchemy/dialects/mysql/pymysql.py b/lib/sqlalchemy/dialects/mysql/pymysql.py index d70e997f7..25e2dadd3 100644 --- a/lib/sqlalchemy/dialects/mysql/pymysql.py +++ b/lib/sqlalchemy/dialects/mysql/pymysql.py @@ -28,9 +28,21 @@ class MySQLDialect_pymysql(MySQLDialect_mysqldb): driver = 'pymysql' description_encoding = None + # Py3K + #supports_unicode_statements = True + # Py2K + # end Py2K @classmethod def dbapi(cls): return __import__('pymysql') + # Py3K + #def _extract_error_code(self, exception): + # if isinstance(exception.args[0], Exception): + # exception = exception.args[0] + # return exception.args[0] + # Py2K + # end Py2K + dialect = MySQLDialect_pymysql |