Fix variable argument support in @deprecate_non_keyword_only_args.

Review Request #12720 — Created Nov. 10, 2022 and submitted — Latest diff uploaded

Information

RBTools
release-5.x

Reviewers

The @deprecate_non_keyword_only_args decorator 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 *args and **kwargs as
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
these instead.

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.

Commits

Files