  
  import inspect
  import pickle
  import re
  import unittest
  
  import pytest
  from django.db import models
  
  from rest_framework import exceptions, fields, relations, serializers
 
</s> remove from rest_framework.compat import Mapping, unicode_repr
 </s> add from rest_framework.compat import Mapping </s> remove # coding: utf-8
from __future__ import unicode_literals

 </s> add  </s> remove from django.utils.six.moves.urllib import parse as urlparse
 </s> add  </s> remove from __future__ import unicode_literals

 </s> add  </s> remove from __future__ import unicode_literals

 </s> add 
from collections import ChainMap
  
  import inspect
  import pickle
  import re
from collections import ChainMap
  
  import pytest
  from django.db import models
  
  from rest_framework import exceptions, fields, relations, serializers
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_serializer.py