diff --git a/django/contrib/auth/checks.py b/django/contrib/auth/checks.py index 27a28b5172e..05487fe5364 100644 --- a/django/contrib/auth/checks.py +++ b/django/contrib/auth/checks.py @@ -2,11 +2,11 @@ from __future__ import unicode_literals from itertools import chain +from types import MethodType from django.apps import apps from django.conf import settings from django.core import checks -from django.utils import six from .management import _get_builtin_permissions @@ -74,7 +74,7 @@ def check_user_model(app_configs=None, **kwargs): ) ) - if isinstance(cls().is_anonymous, six.types.MethodType): + if isinstance(cls().is_anonymous, MethodType): errors.append( checks.Critical( '%s.is_anonymous must be an attribute or property rather than ' @@ -84,7 +84,7 @@ def check_user_model(app_configs=None, **kwargs): id='auth.C009', ) ) - if isinstance(cls().is_authenticated, six.types.MethodType): + if isinstance(cls().is_authenticated, MethodType): errors.append( checks.Critical( '%s.is_authenticated must be an attribute or property rather '