Use getfullargspec on Python 3 and getargspec on Python 2.

Review Request #11996 — Created Jan. 25, 2022 and submitted

chipx86
Django Evolution
release-2.x
django-evolution

We need to check the arguments of the function passed into a
SQLMutation, to determine if we need to be in a legacy mode when
calling that function. We were using getargspec() for this, but that
emits deprecation warnings on Python 3.

We now call getfullargspec() on Python 3 instead, avoiding these
warnings.

All unit tests pass for all supported configurations.

Summary
Use getfullargspec on Python 3 and getargspec on Python 2.
david
  1. Ship It!
  2. 
      
chipx86
Review request changed

Status: Closed (submitted)

Change Summary:

Pushed to release-2.x (3cb84c0)
Loading...