From: Mike Bayer Date: Wed, 7 Apr 2021 15:03:06 +0000 (-0400) Subject: mariadb+pymsql -> mariadb+pymysql X-Git-Tag: rel_1_4_7~18 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4d21920638af4729b6ff09b1ac8c3a20878bd922;p=thirdparty%2Fsqlalchemy%2Fsqlalchemy.git mariadb+pymsql -> mariadb+pymysql Fixes: #6217 Change-Id: Icd8275c49f30ea77d00f76209fb71fb2b8fa9528 --- diff --git a/lib/sqlalchemy/dialects/mysql/base.py b/lib/sqlalchemy/dialects/mysql/base.py index 986ed87575..3966126e2d 100644 --- a/lib/sqlalchemy/dialects/mysql/base.py +++ b/lib/sqlalchemy/dialects/mysql/base.py @@ -33,7 +33,7 @@ syntactical and behavioral differences that SQLAlchemy accommodates automaticall To connect to a MariaDB database, no changes to the database URL are required:: - engine = create_engine("mysql+pymsql://user:pass@some_mariadb/dbname?charset=utf8mb4") + engine = create_engine("mysql+pymysql://user:pass@some_mariadb/dbname?charset=utf8mb4") Upon first connect, the SQLAlchemy dialect employs a server version detection scheme that determines if the @@ -51,7 +51,7 @@ useful for the case where an application makes use of MariaDB-specific features and is not compatible with a MySQL database. To use this mode of operation, replace the "mysql" token in the above URL with "mariadb":: - engine = create_engine("mariadb+pymsql://user:pass@some_mariadb/dbname?charset=utf8mb4") + engine = create_engine("mariadb+pymysql://user:pass@some_mariadb/dbname?charset=utf8mb4") The above engine, upon first connect, will raise an error if the server version detection detects that the backing database is not MariaDB.