--- /dev/null
+.. change::
+ :tags: bug, mysql
+ :tickets: 5821
+
+ Fixed deprecation warnings that arose as a result of the release of PyMySQL
+ 1.0, including deprecation warnings for the "db" and "passwd" parameters
+ now replaced with "database" and "password".
+
return pool.AsyncAdaptedQueuePool
def create_connect_args(self, url):
- args, kw = super(MySQLDialect_aiomysql, self).create_connect_args(url)
- if "passwd" in kw:
- kw["password"] = kw.pop("passwd")
- return args, kw
+ return super(MySQLDialect_aiomysql, self).create_connect_args(
+ url, _translate_args=dict(username="user", database="db")
+ )
def is_disconnect(self, e, connection, cursor):
if super(MySQLDialect_aiomysql, self).is_disconnect(
connection, additional_tests
)
- def create_connect_args(self, url):
- opts = url.translate_connect_args(
- database="db", username="user", password="passwd"
- )
+ def create_connect_args(self, url, _translate_args=None):
+ if _translate_args is None:
+ _translate_args = dict(
+ database="db", username="user", password="passwd"
+ )
+
+ opts = url.translate_connect_args(**_translate_args)
opts.update(url.query)
util.coerce_kw_type(opts, "compress", bool)
def dbapi(cls):
return __import__("pymysql")
+ def create_connect_args(self, url, _translate_args=None):
+ if _translate_args is None:
+ _translate_args = dict(username="user")
+ return super(MySQLDialect_pymysql, self).create_connect_args(
+ url, _translate_args=_translate_args
+ )
+
def is_disconnect(self, e, connection, cursor):
if super(MySQLDialect_pymysql, self).is_disconnect(
e, connection, cursor
greenlet;python_version>="3"
postgresql_psycopg2binary = psycopg2-binary
postgresql_psycopg2cffi = psycopg2cffi
-pymysql = pymysql
+pymysql =
+ pymysql;python_version>="3"
+ pymysql<1;python_version<"3"
aiomysql = aiomysql
[egg_info]
postgresql: .[postgresql_pg8000]; python_version >= '3'
mysql: .[mysql]
mysql: .[pymysql]
- mysql: .[aiomysql]; python_version >= '3'
+ mysql: git+https://github.com/sqlalchemy/aiomysql@sqlalchemy_tox; python_version >= '3'
mysql: .[mariadb_connector]; python_version >= '3'
# we should probably try to get mysql_connector back in the mix