• 
      

    Add and use backports of Django's arg spec functions.

    Review Request #11928 — Created Jan. 12, 2022 and submitted

    Information

    Djblets
    release-2.x

    Reviewers

    We have some deprecated uses of inspect.getargspec(), which has long
    since been replaced by inspect.getfullargspec and inspect.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
    Add and use backports of Django's arg spec functions.
    We have some deprecated uses of `inspect.getargspec()`, which has long since been replaced by `inspect.getfullargspec` and `inspect.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.
    0b58896a9e46de2106b87f637005478e9a1bee4e
    Description From Last Updated

    E303 too many blank lines (2)

    reviewbotreviewbot

    E303 too many blank lines (2)

    reviewbotreviewbot

    E303 too many blank lines (2)

    reviewbotreviewbot

    E303 too many blank lines (2)

    reviewbotreviewbot

    E303 too many blank lines (2)

    reviewbotreviewbot

    E303 too many blank lines (2)

    reviewbotreviewbot
    Checks run (1 failed, 1 succeeded)
    flake8 failed.
    JSHint passed.

    flake8

    chipx86
    david
    1. Ship It!
    2. 
        
    chipx86
    chipx86
    Review request changed
    Status:
    Completed
    Change Summary:
    Pushed to release-2.x (6fec0c2)