From 7ebe75ab70ca91a9b56e689ada0f72e1b76de659 Mon Sep 17 00:00:00 2001 From: Marc Mueller <30130371+cdce8p@users.noreply.github.com> Date: Mon, 16 Jun 2025 12:05:20 +0200 Subject: [PATCH] Replace deprecated asyncio.iscoroutinefunction --- pyhap/util.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pyhap/util.py b/pyhap/util.py index e6cb6164..d8b43c5a 100644 --- a/pyhap/util.py +++ b/pyhap/util.py @@ -1,6 +1,7 @@ import asyncio import base64 import functools +import inspect import random import socket import sys @@ -41,7 +42,7 @@ def iscoro(func): """ if isinstance(func, functools.partial): func = func.func - return asyncio.iscoroutinefunction(func) + return inspect.iscoroutinefunction(func) def get_local_address() -> str: