      charset = None
      format = 'openapi-json'
  
      def render(self, data, media_type=None, renderer_context=None):
          return json.dumps(data, indent=2).encode('utf-8')
 
</s> remove     BaseRenderer, BrowsableAPIRenderer, JSONRenderer, OpenAPIRenderer
 </s> add     BaseRenderer, BrowsableAPIRenderer, JSONOpenAPIRenderer, JSONRenderer,
    OpenAPIRenderer
        return json.dumps(data, cls=self.encoder_class, indent=2).encode('utf-8')
      charset = None
      format = 'openapi-json'
  
      def render(self, data, media_type=None, renderer_context=None):
        return json.dumps(data, cls=self.encoder_class, indent=2).encode('utf-8')
keep keep keep keep replace
 Fix OpenAPISchema rendering for timedelta (#7641)

* Add failing test when rendering to json a schema with timedelta

* Fix JSONOpenAPIRenderer for fields with default=timedelta()

* fix isort

* fix test for python 3.5

Co-authored-by: Pierre Chiquet <pierre.chiquet@ubikey.fr> 
rest_framework/renderers.py