flake8
-
djblets/util/compat/django/utils/inspect.py (Diff revision 1) Show all issues -
-
-
-
-
Review Request #11928 — Created Jan. 12, 2022 and submitted
We have some deprecated uses of
inspect.getargspec()
, which has long
since been replaced byinspect.getfullargspec
andinspect.Signature
.Most of our uses in Djblets (and Review Board) check for the same few
things (presence of**kwargs
, specific parameters, etc.), and
fortunately Django has some nice utility methods in
django.utils.inspect
for these purposes. These were introduced in
Django 1.8, and since Djblets 2.x supports Django 1.6, we can't import
them directly.This change adds a compat module for
django.utils.inspect
(djblets.util.compat.django.utils.inspect
), and switches our code to
using it.It also updates the deprecation warning for one of the uses to use our
deprecation classes.
All unit tests pass on all versions of Django and Python.
Summary | ID |
---|---|
0b58896a9e46de2106b87f637005478e9a1bee4e |
djblets/util/compat/django/utils/inspect.py (Diff revision 1) |
---|
Removed extra blank lines.
Commits: |
|
|||||||
---|---|---|---|---|---|---|---|---|
Diff: |
Revision 2 (+368 -10) |
Updated for the new usage of
getargspec
for middleware.
Commits: |
|
|||||||
---|---|---|---|---|---|---|---|---|
Diff: |
Revision 3 (+382 -20) |