From 869bd9cee0a1e6cde0699fb6184a35c50f74e138 Mon Sep 17 00:00:00 2001 From: Mike Bayer Date: Tue, 1 Dec 2020 20:55:06 -0500 Subject: Make sure asyncpgfallback has __slots__ the test suite failed to find that we started accessing a non-existent slot "_isolation_setting" added by me in 9b779611f9, as the test suite makes use of the AsyncAdaptFallback_asyncpg_connection subclass, which didn't include __slots__ and therefore didn't catch that _isolation_setting wasn't added to slots. Fixes: #5739 Change-Id: Ibbbedc2ee0f1d1c9d91ba7898d755812deccb380 --- lib/sqlalchemy/dialects/postgresql/asyncpg.py | 3 +++ 1 file changed, 3 insertions(+) (limited to 'lib/sqlalchemy/dialects/postgresql/asyncpg.py') diff --git a/lib/sqlalchemy/dialects/postgresql/asyncpg.py b/lib/sqlalchemy/dialects/postgresql/asyncpg.py index 412feda0f..889293eab 100644 --- a/lib/sqlalchemy/dialects/postgresql/asyncpg.py +++ b/lib/sqlalchemy/dialects/postgresql/asyncpg.py @@ -480,6 +480,7 @@ class AsyncAdapt_asyncpg_connection: "dbapi", "_connection", "isolation_level", + "_isolation_setting", "readonly", "deferrable", "_transaction", @@ -573,6 +574,8 @@ class AsyncAdapt_asyncpg_connection: class AsyncAdaptFallback_asyncpg_connection(AsyncAdapt_asyncpg_connection): + __slots__ = () + await_ = staticmethod(await_fallback) -- cgit v1.2.1