  from rest_framework import (
      HTTP_HEADER_ENCODING, authentication, generics, permissions, serializers,
      status, views
  )
  from rest_framework.compat import ResolverMatch, guardian, set_many
  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     BaseAuthentication, BasicAuthentication, RemoteUserAuthentication, SessionAuthentication,
    TokenAuthentication)
 </s> add     BaseAuthentication, BasicAuthentication, RemoteUserAuthentication,
    SessionAuthentication, TokenAuthentication
) </s> remove from rest_framework.compat import set_many
 </s> add  </s> remove from rest_framework.compat import include
 </s> add  </s> remove from rest_framework.compat import include
 </s> add  </s> remove from django.conf.urls import url
 </s> add from django.conf.urls import include, url
from rest_framework.compat import ResolverMatch, guardian
  from rest_framework import (
      HTTP_HEADER_ENCODING, authentication, generics, permissions, serializers,
      status, views
  )
from rest_framework.compat import ResolverMatch, guardian
  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
 Remove Django 1.8 & 1.9 compatibility code (#5481)

* Identify code that needs to be pulled out of/removed from compat.py

* Extract modern code from get_names_and_managers in compat.py and remove compat code

* Extract modern code from is_authenticated() in compat.py and remove.

* Extract modern code from is_anonymous() in compat.py and remove

* Extract modern code from get_related_model() from compat.py and remove

* Extract modern code from value_from_object() in compat.py and remove

* Update postgres compat

JSONField now always available.

* Remove DecimalValidator compat

* Remove get_remote_field compat

* Remove template_render compat

Plus isort.

* Remove set_many compat

* Remove include compat 
tests/test_permissions.py