Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bump SQLAlchemy version to 1.4 #940

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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