diff options
author | Federico Caselli <cfederico87@gmail.com> | 2021-02-06 17:54:42 +0100 |
---|---|---|
committer | Federico Caselli <cfederico87@gmail.com> | 2021-02-06 17:54:42 +0100 |
commit | 2bd80d506a8cdc3ce94da7e9cfcb8498d564a192 (patch) | |
tree | 0848902a49c4291fbe6e86b8156a28348fff00fe /lib/sqlalchemy/dialects/mysql/aiomysql.py | |
parent | bc9221bf781adfffdddf12860d4eed7650457a0a (diff) | |
download | sqlalchemy-2bd80d506a8cdc3ce94da7e9cfcb8498d564a192.tar.gz |
Use slots in the aiomysql proxy classes
Add slots in the proxy cursor and connection classes in the aiomysql dialect
Change-Id: If72fccf0cc16557a7e3a0c9450733c8337bec15a
Diffstat (limited to 'lib/sqlalchemy/dialects/mysql/aiomysql.py')
-rw-r--r-- | lib/sqlalchemy/dialects/mysql/aiomysql.py | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/lib/sqlalchemy/dialects/mysql/aiomysql.py b/lib/sqlalchemy/dialects/mysql/aiomysql.py index f0665133f..6c968a1e7 100644 --- a/lib/sqlalchemy/dialects/mysql/aiomysql.py +++ b/lib/sqlalchemy/dialects/mysql/aiomysql.py @@ -41,6 +41,13 @@ from ...util.concurrency import await_only class AsyncAdapt_aiomysql_cursor: server_side = False + __slots__ = ( + "_adapt_connection", + "_connection", + "await_", + "_cursor", + "_rows", + ) def __init__(self, adapt_connection): self._adapt_connection = adapt_connection @@ -123,7 +130,7 @@ class AsyncAdapt_aiomysql_cursor: class AsyncAdapt_aiomysql_ss_cursor(AsyncAdapt_aiomysql_cursor): - + __slots__ = () server_side = True def __init__(self, adapt_connection): @@ -154,6 +161,7 @@ class AsyncAdapt_aiomysql_ss_cursor(AsyncAdapt_aiomysql_cursor): class AsyncAdapt_aiomysql_connection: await_ = staticmethod(await_only) + __slots__ = ("dbapi", "_connection") def __init__(self, dbapi, connection): self.dbapi = dbapi |