Update all User.is_authenticated/is_anonymous usage to access as properties.

Review Request #11620 — Created May 26, 2021 and submitted

Information

Djblets
release-3.x

Reviewers

Old versions of Django defined User.is_authenticated() and
User.is_anonymous() as methods, but in modern versions they're
properties. Method usage was deprecated in Django 1.10, but still worked
until Django 2.0.

We're now using the property form for these checks. This is compatible
with all supported versions of Django targeted for Djblets 3.0.

Unit tests pass on Django 1.11 and on 3.2 (when combined with other
in-progress changes).

Summary ID
Update all User.is_authenticated/is_anonymous usage to access as properties.
Old versions of Django defined `User.is_authenticated()` and `User.is_anonymous()` as methods, but in modern versions they're properties. Method usage was deprecated in Django 1.10, but still worked until Django 2.0. We're now using the property form for these checks. This is compatible with all supported versions of Django targeted for Djblets 3.0.
b7289354d932558f9c22573e0c171d7569fb87fe
david
  1. Ship It!
  2. 
      
chipx86
Review request changed
Status:
Completed
Change Summary:
Pushed to release-3.x (9ab9dd9)