From b1146821aa8899ea8724c61ca3d48ba4928a1db4 Mon Sep 17 00:00:00 2001 From: Mike Bayer Date: Sat, 21 Mar 2015 15:18:36 -0400 Subject: [PATCH] some doc defenses --- lib/sqlalchemy/dialects/mysql/base.py | 6 ++++-- lib/sqlalchemy/dialects/mysql/mysqlconnector.py | 3 +++ lib/sqlalchemy/dialects/mysql/oursql.py | 3 +++ 3 files changed, 10 insertions(+), 2 deletions(-) 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:: -- 2.47.3