summaryrefslogtreecommitdiff
path: root/lib/sqlalchemy/dialects/mysql/aiomysql.py
diff options
context:
space:
mode:
authorlong2ice <long2ice@gmail.com>2021-09-16 11:08:25 -0400
committerMike Bayer <mike_mp@zzzcomputing.com>2021-09-17 11:20:19 -0400
commit11eecfacb7b36c209c1ad726f5e5b7525860977b (patch)
tree6bc6e32e3defe9099e217fcb2ba5205339dca200 /lib/sqlalchemy/dialects/mysql/aiomysql.py
parentdb847ca4e52de0e70d4993d1b7ac4de1c947b864 (diff)
downloadsqlalchemy-11eecfacb7b36c209c1ad726f5e5b7525860977b.tar.gz
Add `asyncmy` support
Added initial support for the ``asyncmy`` asyncio database driver for MySQL and MariaDB. This driver is very new, however appears to be the only current alternative to the ``aiomysql`` driver which currently appears to be unmaintained and is not working with current Python versions. Much thanks to long2ice for the pull request for this dialect. Fixes: #6993 Closes: #7000 Pull-request: https://github.com/sqlalchemy/sqlalchemy/pull/7000 Pull-request-sha: f7d6c811fc72324a83c8af635bbca8b268b0098e Change-Id: I4ef54b43334feff7e3a710fc4de6821437f3bb68
Diffstat (limited to 'lib/sqlalchemy/dialects/mysql/aiomysql.py')
-rw-r--r--lib/sqlalchemy/dialects/mysql/aiomysql.py12
1 files changed, 5 insertions, 7 deletions
diff --git a/lib/sqlalchemy/dialects/mysql/aiomysql.py b/lib/sqlalchemy/dialects/mysql/aiomysql.py
index 3275d1888..c9a87145e 100644
--- a/lib/sqlalchemy/dialects/mysql/aiomysql.py
+++ b/lib/sqlalchemy/dialects/mysql/aiomysql.py
@@ -11,6 +11,10 @@ r"""
:connectstring: mysql+aiomysql://user:password@host:port/dbname[?key=value&key=value...]
:url: https://github.com/aio-libs/aiomysql
+.. warning:: The aiomysql dialect as of September, 2021 appears to be unmaintained
+ and no longer functions for Python version 3.10. Please refer to the
+ :ref:`asyncmy` dialect for current MySQL asyncio functionality.
+
The aiomysql dialect is SQLAlchemy's second Python asyncio dialect.
Using a special asyncio mediation layer, the aiomysql dialect is usable
@@ -21,13 +25,7 @@ This dialect should normally be used only with the
:func:`_asyncio.create_async_engine` engine creation function::
from sqlalchemy.ext.asyncio import create_async_engine
- engine = create_async_engine("mysql+aiomysql://user:pass@hostname/dbname")
-
-Unicode
--------
-
-Please see :ref:`mysql_unicode` for current recommendations on unicode
-handling.
+ engine = create_async_engine("mysql+aiomysql://user:pass@hostname/dbname?charset=utf8mb4")
""" # noqa