  from rest_framework.authtoken.views import obtain_auth_token
  from rest_framework.compat import uritemplate
  from rest_framework.parsers import JSONParser, MultiPartParser
  from rest_framework.renderers import (
      BaseRenderer, BrowsableAPIRenderer, JSONRenderer, OpenAPIRenderer
  )
  from rest_framework.request import Request
  from rest_framework.schemas.openapi import AutoSchema, SchemaGenerator
  
  from . import views
 
</s> remove         return json.dumps(data, indent=2).encode('utf-8')
 </s> add         return json.dumps(data, cls=self.encoder_class, indent=2).encode('utf-8')
    BaseRenderer, BrowsableAPIRenderer, JSONOpenAPIRenderer, JSONRenderer,
    OpenAPIRenderer
  from rest_framework.authtoken.views import obtain_auth_token
  from rest_framework.compat import uritemplate
  from rest_framework.parsers import JSONParser, MultiPartParser
  from rest_framework.renderers import (
    BaseRenderer, BrowsableAPIRenderer, JSONOpenAPIRenderer, JSONRenderer,
    OpenAPIRenderer
  )
  from rest_framework.request import Request
  from rest_framework.schemas.openapi import AutoSchema, SchemaGenerator
  
  from . import views
keep keep keep keep replace keep keep keep keep keep
 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> 
tests/schemas/test_openapi.py