]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commitdiff
Revert "correct for asyncio.Runner not in py311 stubs"
authorMike Bayer <mike_mp@zzzcomputing.com>
Thu, 28 Dec 2023 14:57:37 +0000 (09:57 -0500)
committerMike Bayer <mike_mp@zzzcomputing.com>
Thu, 28 Dec 2023 14:57:37 +0000 (09:57 -0500)
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

index 54e245050c0b506474c317ad4e31a01daf991c55..bcdb928c29619ae14036a54b2f8564a856fb32fa 100644 (file)
@@ -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: