From: Mike Bayer Date: Fri, 20 Mar 2015 19:17:07 +0000 (-0400) Subject: Merge branch 'mysqlclient' of https://bitbucket.org/methane/sqlalchemy into pr48 X-Git-Tag: rel_1_0_0b2~2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=824e9013797cc20538b8002643057b0104081c1a;p=thirdparty%2Fsqlalchemy%2Fsqlalchemy.git Merge branch 'mysqlclient' of https://bitbucket.org/methane/sqlalchemy into pr48 Conflicts: lib/sqlalchemy/dialects/mysql/mysqldb.py --- 824e9013797cc20538b8002643057b0104081c1a diff --cc lib/sqlalchemy/dialects/mysql/mysqldb.py index c61b098468,b18930b663..c1c576e106 --- a/lib/sqlalchemy/dialects/mysql/mysqldb.py +++ b/lib/sqlalchemy/dialects/mysql/mysqldb.py @@@ -29,18 -28,11 +29,27 @@@ unicode** will include both charset an create_engine("mysql+mysqldb://user:pass@host/dbname?charset=utf8&use_unicode=0") -As of this writing, MySQLdb only runs on Python 2 and development has been stopped. -`mysqlclient`_ is fork of MySQLdb and provides Python 3 support and some bugfixes. +The ``'utf8'`` charset on MySQL only supports **up to three-byte codepoints**, +and not four-byte codepoints as normally supported by utf8. In order to +support all unicode codepoints, MySQL versions 5.5.3 and above +provide a MySQL-specific encoding ``'utf8mb4'``, which supports +codepoints up to four bytes in size:: + + create_engine("mysql+mysqldb://user:pass@host/dbname?charset=utf8mb4&use_unicode=0") + +.. seealso:: + + :ref:`mysql_unicode` - Includes background on the ``'utf8mb4'`` character set. + ++Py3K Support ++------------ ++ ++Currently, MySQLdb only runs on Python 2 and development has been stopped. ++`mysqlclient`_ is fork of MySQLdb and provides Python 3 support as well ++as some bugfixes. + + .. _mysqlclient: https://github.com/PyMySQL/mysqlclient-python + Known Issues -------------