Skip to content

Commit 012648b

Browse files
committed
fix sqla support
1 parent ce320a3 commit 012648b

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

aiomysql/sa/result.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,12 @@ def __init__(self, result_proxy, metadata):
104104
self._keymap = keymap = {}
105105
self.keys = []
106106
dialect = result_proxy.dialect
107-
typemap = dialect.dbapi_type_map
107+
108+
# `dbapi_type_map` property removed in SQLAlchemy 1.2+.
109+
# Usage of `getattr` only needed for backward compatibility with
110+
# older versions of SQLAlchemy.
111+
typemap = getattr(dialect, 'dbapi_type_map', {})
112+
108113
assert dialect.case_sensitive, \
109114
"Doesn't support case insensitive database connection"
110115

requirements-dev.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,4 @@ pytest-cov==2.5.1
77
pytest-sugar==0.9.0
88
sphinx==1.6.5
99
sphinxcontrib-asyncio==0.2.0
10-
sqlalchemy==1.1.15
10+
sqlalchemy==1.2.0

0 commit comments

Comments
 (0)