From 4ea8c3bba7924f8dd92230138bf23953d08f6099 Mon Sep 17 00:00:00 2001 From: Mike Bayer Date: Thu, 28 Dec 2023 09:57:37 -0500 Subject: [PATCH] Revert "correct for asyncio.Runner not in py311 stubs" I didn't really do this correctly, there's no "py311" boolean in type checking so this has to be unconditional. This reverts commit 6e3625a6334c4da982d4c81637a05fa88bc540b1. --- lib/sqlalchemy/util/concurrency.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/lib/sqlalchemy/util/concurrency.py b/lib/sqlalchemy/util/concurrency.py index 54e245050c..bcdb928c29 100644 --- a/lib/sqlalchemy/util/concurrency.py +++ b/lib/sqlalchemy/util/concurrency.py @@ -20,7 +20,6 @@ from typing import TypeVar from typing import Union from .compat import py311 -from .compat import py312 from .langhelpers import memoized_property from .typing import Literal from .typing import Self @@ -240,7 +239,7 @@ class AsyncAdaptedLock: self.mutex.release() -if py311 or (TYPE_CHECKING and not py312): +if py311: _Runner = asyncio.Runner else: -- 2.47.3