  from rest_framework.templatetags.rest_framework import replace_query_param
  from rest_framework.utils.mediatypes import _MediaType
  
  
  class BaseVersioning(object):
      default_version = api_settings.DEFAULT_VERSION
      allowed_versions = api_settings.ALLOWED_VERSIONS
      version_param = api_settings.VERSION_PARAM
  
      def determine_version(self, request, *args, **kwargs):
 
</s> remove if sys.version_info[:2] >= (3, 4):
    JSON_ERROR = 'JSON parse error - Expecting value:'
else:
    JSON_ERROR = 'JSON parse error - No JSON object could be decoded'
 </s> add JSON_ERROR = 'JSON parse error - Expecting value:' </s> remove class ListModelMixin(object):
 </s> add class ListModelMixin: </s> remove             super(RequestsClient, self).__init__(*args, **kwargs)
 </s> add             super().__init__(*args, **kwargs) </s> remove             return super(CoreAPIClient, self).__init__(*args, **kwargs)
 </s> add             return super().__init__(*args, **kwargs) </s> remove         return super(NonAtomicAPIExceptionView, self).dispatch(*args, **kwargs)
 </s> add         return super().dispatch(*args, **kwargs)
class BaseVersioning:
  from rest_framework.templatetags.rest_framework import replace_query_param
  from rest_framework.utils.mediatypes import _MediaType
  
  
class BaseVersioning:
      default_version = api_settings.DEFAULT_VERSION
      allowed_versions = api_settings.ALLOWED_VERSIONS
      version_param = api_settings.VERSION_PARAM
  
      def determine_version(self, request, *args, **kwargs):
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> 
rest_framework/versioning.py