def _getargspec_from_signature(function):
    """
    Reproduce getargspec() interface using newer signature protocol
    """
    from inspect import signature
    args, vararg, varkwd, defaults = [], None, None, []
    sig = signature(function)
    for p in sig.parameters.values():
        args.append(p.name)
        if p.default is not p.empty:
            defaults.append(p.default)
        if p.kind is p.VAR_POSITIONAL:
            vararg = p.name
        elif p.kind is p.VAR_KEYWORD:
            varkwd = p.name
    return args, vararg, varkwd, defaults
