From 90c727cd7d09ee3a6e404aef27dad2f440864996 Mon Sep 17 00:00:00 2001 From: Alexandre Rossi Date: Sat, 16 Dec 2023 18:13:31 +0100 Subject: [PATCH] getargspec is deprecated in python3.11 --- webapp/graphite/functions/__init__.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/webapp/graphite/functions/__init__.py b/webapp/graphite/functions/__init__.py index f98daf7c5..12be79825 100644 --- a/webapp/graphite/functions/__init__.py +++ b/webapp/graphite/functions/__init__.py @@ -96,11 +96,10 @@ def PieFunction(name): def functionInfo(name, func): - argspec = inspect.getargspec(func) - argformat = inspect.formatargspec(argspec[0][1:], argspec[1], argspec[2], argspec[3]) + sig = inspect.signature(func) return { 'name': name, - 'function': name + argformat, + 'function': name + str(sig), 'description': inspect.getdoc(func), 'module': inspect.getmodule(func).__name__, 'group': getattr(func, 'group', 'Ungrouped'),