From: Mike Bayer Date: Sat, 21 Mar 2015 19:18:36 +0000 (-0400) Subject: some doc defenses X-Git-Tag: rel_1_0_0b4~10 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b1146821aa8899ea8724c61ca3d48ba4928a1db4;p=thirdparty%2Fsqlalchemy%2Fsqlalchemy.git some doc defenses --- diff --git a/lib/sqlalchemy/dialects/mysql/base.py b/lib/sqlalchemy/dialects/mysql/base.py index a74b20ac4f..131112ff4e 100644 --- a/lib/sqlalchemy/dialects/mysql/base.py +++ b/lib/sqlalchemy/dialects/mysql/base.py @@ -159,8 +159,10 @@ in the URL, such as:: test?charset=utf8") Whether or not the DBAPI handles the job of encoding and decoding is determined -by passing the ``use_unicode`` parameter. For example, to disable -unicode conversion by the DBAPI and let SQLAlchemy handle it:: +by passing the ``use_unicode`` parameter, supported by MySQLdb and PyMySQL +and possibly others. +For example, to disable unicode conversion by the DBAPI and let +SQLAlchemy handle it:: e = create_engine("mysql+pymysql://scott:tiger@localhost/\ test?charset=utf8&use_uncode=0") diff --git a/lib/sqlalchemy/dialects/mysql/mysqlconnector.py b/lib/sqlalchemy/dialects/mysql/mysqlconnector.py index 97fd0ccdfa..33cddd060f 100644 --- a/lib/sqlalchemy/dialects/mysql/mysqlconnector.py +++ b/lib/sqlalchemy/dialects/mysql/mysqlconnector.py @@ -17,6 +17,9 @@ Unicode ------- +The ``use_unicode=0`` flag is **not** supported in MySQL-Connector at this +time, nor is the ``utf8mb4`` charset. + Please see :ref:`mysql_unicode` for background on enabling charset support with mysql-connector. diff --git a/lib/sqlalchemy/dialects/mysql/oursql.py b/lib/sqlalchemy/dialects/mysql/oursql.py index 7f35e63bea..f4eca42528 100644 --- a/lib/sqlalchemy/dialects/mysql/oursql.py +++ b/lib/sqlalchemy/dialects/mysql/oursql.py @@ -16,6 +16,9 @@ Unicode ------- +The ``use_unicode=0`` flag is **not** supported in OurSQL, +nor is the ``utf8mb4`` charset. + oursql defaults to using ``utf8`` as the connection charset, but other encodings may be used instead. Like the MySQL-Python driver, unicode support can be completely disabled::