Use Django's func_accepts_kwargs() for kwargs inspection.
Review Request #11938 — Created Jan. 19, 2022 and submitted
Django provides a utility function named
checks a function's signature to determine if it accepts a
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
getargspecimport that has been removed.
Unit tests pass.