Skip to content

Commit 31bef47

Browse files
committed
some catching up with aio-libs#508
1 parent d973944 commit 31bef47

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

async_lru/__init__.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -320,7 +320,10 @@ def wrapper(
320320
if hasattr(fn, "_make_unbound_method"):
321321
fn = fn._make_unbound_method()
322322

323-
return _LRUCacheWrapper(fn, maxsize, typed, ttl)
323+
wrapper = _LRUCacheWrapper(fn, maxsize, typed, ttl)
324+
if sys.version_info >= (3, 12):
325+
wrapper = inspect.markcoroutinefunction(wrapper)
326+
return wrapper
324327

325328
return wrapper
326329

0 commit comments

Comments
 (0)