Fix variable argument support in @deprecate_non_keyword_only_args.
Review Request #12720 — Created Nov. 10, 2022 and submitted
@deprecate_non_keyword_only_argsdecorator had some flaws when
passing in positional arguments as keyword arguments or when passing in
variable positional arguments.
This was happening in part because we treated
standard arguments, and ended up with incorrect offsets in the arguments
passed during a call. These didn't match up. We actually needed to skip
We also needed to skip copying over any positional arguments that were
passed as keyword arguments, for similar reasons.
Unit tests passed.
Initially hit these issues in Review Board's upcoming copy of this
function. This is a backport of those fixes, which are confirmed fixed.