]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commitdiff
- Updated the "supports_unicode_statements" flag to True for MySQLdb
authorMike Bayer <mike_mp@zzzcomputing.com>
Fri, 5 Dec 2014 00:12:52 +0000 (19:12 -0500)
committerMike Bayer <mike_mp@zzzcomputing.com>
Fri, 5 Dec 2014 00:12:52 +0000 (19:12 -0500)
and Pymysql under Python 2.   This refers to the SQL statements
themselves, not the parameters, and affects issues such as table
and column names using non-ASCII characters.   These drivers both
appear to support Python 2 Unicode objects without issue in modern
versions.
fixes #3121

doc/build/changelog/changelog_10.rst
lib/sqlalchemy/dialects/mysql/mysqldb.py
lib/sqlalchemy/dialects/mysql/pymysql.py

index f90ae40f81eb7d436c20ddfb44ca1895be11cf29..7126d0930ed4b0c50416e58e47685cce0c50b508 100644 (file)
     series as well.  For changes that are specific to 1.0 with an emphasis
     on compatibility concerns, see :doc:`/changelog/migration_10`.
 
+    .. change::
+        :tags: feature, mysql
+        :tickets: 3121
+
+        Updated the "supports_unicode_statements" flag to True for MySQLdb
+        and Pymysql under Python 2.   This refers to the SQL statements
+        themselves, not the parameters, and affects issues such as table
+        and column names using non-ASCII characters.   These drivers both
+        appear to support Python 2 Unicode objects without issue in modern
+        versions.
+
     .. change::
         :tags: bug, mysql
         :tickets: 3263
index 73210d67a18d8fa8267601bad4cb1b15018606da..893c6a9e2ee3ceb8dfe7cd8077156d8314ee86d3 100644 (file)
@@ -77,7 +77,7 @@ class MySQLIdentifierPreparer_mysqldb(MySQLIdentifierPreparer):
 
 class MySQLDialect_mysqldb(MySQLDialect):
     driver = 'mysqldb'
-    supports_unicode_statements = False
+    supports_unicode_statements = True
     supports_sane_rowcount = True
     supports_sane_multi_rowcount = True
 
index 31226cea053151e00d4656493974c5f88f415009..8df2ba03fd8ed1dffae772a4b371dd4b2fb03f60 100644 (file)
@@ -31,8 +31,7 @@ class MySQLDialect_pymysql(MySQLDialect_mysqldb):
     driver = 'pymysql'
 
     description_encoding = None
-    if py3k:
-        supports_unicode_statements = True
+    supports_unicode_statements = True
 
     @classmethod
     def dbapi(cls):