Skip to content

Commit

Permalink
Bump SQLAlchemy version to 1.4
Browse files Browse the repository at this point in the history
  • Loading branch information
Nothing4You committed Jun 11, 2023
1 parent 83aa96e commit e856063
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions aiomysql/sa/connection.py
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down
4 changes: 2 additions & 2 deletions aiomysql/sa/engine.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion requirements-dev.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
2 changes: 1 addition & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit e856063

Please sign in to comment.