  from rest_framework import (
      HTTP_HEADER_ENCODING, RemovedInDRF310Warning, authentication, generics,
      permissions, serializers, status, views
  )
  from rest_framework.compat import PY36, is_guardian_installed, mock
  from rest_framework.filters import DjangoObjectPermissionsFilter
  from rest_framework.routers import DefaultRouter
  from rest_framework.test import APIRequestFactory
  from tests.models import BasicModel
  
 
</s> remove from django.utils import six
 </s> add  </s> remove from django.utils import six
 </s> add  </s> remove from django.utils.six.moves import reload_module
 </s> add  </s> remove from django.utils import six
 </s> add  </s> remove from django.utils import six
 </s> add 
from rest_framework.compat import PY36, is_guardian_installed
  from rest_framework import (
      HTTP_HEADER_ENCODING, RemovedInDRF310Warning, authentication, generics,
      permissions, serializers, status, views
  )
from rest_framework.compat import PY36, is_guardian_installed
  from rest_framework.filters import DjangoObjectPermissionsFilter
  from rest_framework.routers import DefaultRouter
  from rest_framework.test import APIRequestFactory
  from tests.models import BasicModel
  
keep keep keep keep replace keep keep keep keep keep
 Dropped Python 2 compatibility. (#6615)

Thanks to Jon Dufresne (@jdufresne) for review.

Co-authored-by: Asif Saif Uddin <auvipy@gmail.com>
Co-authored-by: Rizwan Mansuri <Rizwan@webbyfox.com> 
tests/test_permissions.py