(f_name, sig, "s" if plural else "", given, kwonly_sig,
"was" if given == 1 and not kwonly_given else "were"))
-def getcallargs(func, *positional, **named):
+def getcallargs(*func_and_positional, **named):
"""Get the mapping of arguments to values.
A dict is returned, with keys the function argument names (including the
names of the * and ** arguments, if any), and values the respective bound
values from 'positional' and 'named'."""
+ func = func_and_positional[0]
+ positional = func_and_positional[1:]
spec = getfullargspec(func)
args, varargs, varkw, defaults, kwonlyargs, kwonlydefaults, ann = spec
f_name = func.__name__
Library
-------
+- Issue #20108: Avoid parameter name clash in inspect.getcallargs().
+
- Issue #12692: Backport the fix for ResourceWarning in test_urllib2net. This
also helps in closing the socket when Connection Close header is not sent.