Taken from https://gitlab.archlinux.org/archlinux/packaging/packages/python-pyliblo diff -ruN a/src/liblo.pyx b/src/liblo.pyx --- a/src/liblo.pyx 2015-04-14 09:02:22.000000000 +0200 +++ b/src/liblo.pyx 2023-04-06 19:51:56.042679208 +0200 @@ -258,9 +258,9 @@ cb.user_data) # call function - if _inspect.getargspec(func)[1] == None: + if _inspect.getfullargspec(func)[1] == None: # determine number of arguments to call the function with - n = len(_inspect.getargspec(func)[0]) + n = len(_inspect.getfullargspec(func)[0]) if _inspect.ismethod(func): n -= 1 # self doesn't count r = cb.func(*func_args[0:n])