Use Django's func_accepts_kwargs() for kwargs inspection.

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

chipx86
Review Board
release-4.0.x
reviewboard

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.

Summary
Use Django's func_accepts_kwargs() for kwargs inspection.
david
  1. Ship It!
  2. 
      
chipx86
Review request changed

Status: Closed (submitted)

Change Summary:

Pushed to release-4.0.x (51fd514)
Loading...