Use getfullargspec on Python 3 and getargspec on Python 2.

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

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.

Diff Revision 1 (Latest)

Commits

First Last Summary ID Author
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 Christian Hammond
django_evolution/mutations.py
Loading...