Update djblets for future Django deprecations.

Review Request #11921 — Created Jan. 10, 2022 and submitted

Information

Djblets
release-3.x

Reviewers

This change updates the Djblets codebase for some upcoming changes to
Django:

  • The authenticate method in authentication backends needs to take the
    request as the first positional argument.
  • Admin site URLs are now added directly in the url() method instead
    of through include(). The Djblets impact here is in loading admin
    URLs defined by extensions.

Ran unit tests and saw no more deprecation warnings.

Summary ID
Update djblets for future Django deprecations.
This change updates the Djblets codebase for some upcoming changes to Django: - `User.is_anonymous` and `User.is_authenticated` have been changed to be properties rather than methods. - The `authenticate` method in authentication backends needs to take the request as the first positional argument. - Admin site URLs are now added directly in the `url()` method instead of through `include()`. The Djblets impact here is in loading admin URLs defined by extensions. Testing Done: Ran unit tests and saw no more deprecation warnings.
3b2d6325c81823e65feb6bf0c1fb61cc272485fb
Description From Last Updated

This will need to land for 3.x, since 2.x supports Django 1.6, which expects is_{anonymous,authenticated} to be methods.

chipx86chipx86

Your latest revision undid all the is_{anonymous,authenticated} changes.

chipx86chipx86

Missing , optional

chipx86chipx86

While here, can you add the missing **kwargs?

chipx86chipx86
chipx86
  1. 
      
  2. Show all issues

    This will need to land for 3.x, since 2.x supports Django 1.6, which expects is_{anonymous,authenticated} to be methods.

  3. Show all issues

    Missing , optional

  4. 
      
david
chipx86
  1. 
      
  2. Show all issues

    Your latest revision undid all the is_{anonymous,authenticated} changes.

    1. Oh, saw the other change. Maybe just the description needs to be changed?

    2. Scratch that. That was in Review Board.

    3. Huh. That's... I don't know how that happened.

    4. Aha. You'd already done that on release-3.x a while ago.

    5. Wait, I did? Wow.

      I don't even remember.

  3. 
      
david
chipx86
  1. 
      
  2. djblets/webapi/auth/backends/api_tokens.py (Diff revision 2)
     
     
     
     
     
     
     
     
     
     
    Show all issues

    While here, can you add the missing **kwargs?

  3. 
      
david
Review request changed
Status:
Completed
Change Summary:
Pushed to release-3.x (4af2d35)