From 5cfe634aea7e2030ec2bc5f1ac202378c2b42197 Mon Sep 17 00:00:00 2001 From: Bastian Krause Date: Sun, 16 Nov 2025 14:10:24 +0100 Subject: [PATCH] remote/client: use non-deprecated iscoroutinefunction from inspect module asyncio.iscoroutinefunction() is deprecated [1] since Python 3.14 [2]. Use inspect.iscoroutinefunction() instead. [1] https://docs.python.org/3/deprecations/index.html#pending-removal-in-python-3-16 [2] https://github.com/python/cpython/commit/bc9d92c67933917b474e61905451c6408c68e71d Signed-off-by: Bastian Krause --- labgrid/remote/client.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/labgrid/remote/client.py b/labgrid/remote/client.py index 2b44796d3..9b6e602da 100755 --- a/labgrid/remote/client.py +++ b/labgrid/remote/client.py @@ -1759,6 +1759,8 @@ def __str__(self): def main(): + import inspect + basicConfig( level=logging.WARNING, stream=sys.stderr, @@ -2214,7 +2216,7 @@ def main(): logging.debug("Started session") try: - if asyncio.iscoroutinefunction(args.func): + if inspect.iscoroutinefunction(args.func): if getattr(args.func, "needs_target", False): place = session.get_acquired_place() target = session._get_target(place)