def getargspec(func):
    '\n        Simple workaroung for getargspec deprecation that returns\n        an ArgSpec-like object\n        '
    sig = inspect.signature(func)
    parameters = sig.parameters
    (args, defaults) = ([], [])
    (varargs, keywords) = (None, None)
    for key in parameters:
        parameter = parameters[key]
        if (parameter.kind == inspect.Parameter.VAR_POSITIONAL):
            varargs = key
        elif (parameter.kind == inspect.Parameter.VAR_KEYWORD):
            keywords = key
        else:
            args.append(key)
        if (parameter.default is not parameter.empty):
            defaults.append(parameter.default)
    defaults = (None if (len(defaults) == 0) else defaults)
    return ArgSpec(args, varargs, keywords, defaults)
Simple workaroung for getargspec deprecation that returns
an ArgSpec-like object
def getargspec(func):
    '\n        Simple workaroung for getargspec deprecation that returns\n        an ArgSpec-like object\n        '
    sig = inspect.signature(func)
    parameters = sig.parameters
    (args, defaults) = ([], [])
    (varargs, keywords) = (None, None)
    for key in parameters:
        parameter = parameters[key]
        if (parameter.kind == inspect.Parameter.VAR_POSITIONAL):
            varargs = key
        elif (parameter.kind == inspect.Parameter.VAR_KEYWORD):
            keywords = key
        else:
            args.append(key)
        if (parameter.default is not parameter.empty):
            defaults.append(parameter.default)
    defaults = (None if (len(defaults) == 0) else defaults)
    return ArgSpec(args, varargs, keywords, defaults)