Use getfullargspec on Python 3 and getargspec on Python 2.

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

Information

Django Evolution
release-2.x

Reviewers

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 ID
Use getfullargspec on Python 3 and getargspec on Python 2.
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.
d5301d6793fb486aefe37352717d70305d3c4100
david
  1. Ship It!
  2. 
      
chipx86
Review request changed
Status:
Completed
Change Summary:
Pushed to release-2.x (3cb84c0)