diff --git a/aiomysql/sa/connection.py b/aiomysql/sa/connection.py index cab3961a..2570ad2d 100644 --- a/aiomysql/sa/connection.py +++ b/aiomysql/sa/connection.py @@ -148,13 +148,13 @@ async def _execute(self, query, *multiparams, **params): key = query compiled = self._compiled_cache.get(key) if not compiled: - compiled = query.compile(dialect=self._dialect) + compiled = query.compile(dialect=self._dialect, compile_kwargs={"render_postcompile": True}) if dp and dp.keys() == compiled.params.keys() \ or not (dp or compiled.params): # we only want queries with bound params in cache self._compiled_cache[key] = compiled else: - compiled = query.compile(dialect=self._dialect) + compiled = query.compile(dialect=self._dialect, compile_kwargs={"render_postcompile": True}) if not isinstance(query, DDLElement): post_processed_params = self._base_params( diff --git a/aiomysql/sa/engine.py b/aiomysql/sa/engine.py index 243e5001..6a708c41 100644 --- a/aiomysql/sa/engine.py +++ b/aiomysql/sa/engine.py @@ -18,8 +18,8 @@ class MySQLCompiler_pymysql(MySQLCompiler_mysqldb): - def construct_params(self, params=None, _group_number=None, _check=True): - pd = super().construct_params(params, _group_number, _check) + def construct_params(self, *args, **kwargs): + pd = super().construct_params(*args, **kwargs) for column in self.prefetch: pd[column.key] = self._exec_default(column.default) diff --git a/requirements-dev.txt b/requirements-dev.txt index b0766e6a..69fd17eb 100644 --- a/requirements-dev.txt +++ b/requirements-dev.txt @@ -8,6 +8,6 @@ pytest-sugar==0.9.7 PyMySQL==1.0.3 sphinx>=1.8.1, <5.1.2 sphinxcontrib-asyncio==0.3.0 -SQLAlchemy==1.3.24 +SQLAlchemy==1.4.48 uvloop==0.17.0 twine==4.0.2 diff --git a/setup.cfg b/setup.cfg index 13611524..f7174bc1 100644 --- a/setup.cfg +++ b/setup.cfg @@ -49,7 +49,7 @@ install_requires = [options.extras_require] sa = - sqlalchemy>=1.3,<1.4 + sqlalchemy>=1.4,<2.0 rsa = PyMySQL[rsa]>=1.0