omab / python-social-auth

Social auth made simple
http://psa.matiasaguirre.net
BSD 3-Clause "New" or "Revised" License
2.83k stars 1.09k forks source link

Django 1.10 RemovedInDjango20Warning: Using user.is_authenticated() and user.is_anonymous() as a method is deprecated. #1013

Closed RevolutionTech closed 7 years ago

RevolutionTech commented 8 years ago

user.is_authenticated() is used throughout code (I noticed it in social/utils.py), but in Django 1.10 is_authenticated is now a property, rather than a method.

This causes a warning in Django 1.10, but in Django 2.0 this code will cease to work.

The full exception message is Using user.is_authenticated() and user.is_anonymous() as a method is deprecated. Remove the parentheses to use it as an attribute.

Ref: https://docs.djangoproject.com/en/1.10/releases/1.10/#using-user-is-authenticated-and-user-is-anonymous-as-methods

omab commented 7 years ago

Fix for this got merged in the new split components python-social-auth.