Use Django's func_accepts_kwargs() for kwargs inspection.

Review Request #11938 — Created Jan. 19, 2022 and submitted — Latest diff uploaded

Information

Review Board
release-4.0.x

Reviewers

Django provides a utility function named func_accepts_kwargs(), which
checks a function's signature to determine if it accepts a **kwargs
argument.

We perform this check from time to time, when trying to work around
legacy extension interfaces. There are currently two cases where we were
performing this check ourselves using getargspec, which is deprecated
and warns on Python 3.

This change switches to Django's method, saving us the deprecation
warning and slimming down the code.

There's also an old unused getargspec import that has been removed.

Unit tests pass.

Commits

Files