  import pickle
  import re
  from collections import ChainMap
  
  import pytest
  from django.db import models
  
  from rest_framework import exceptions, fields, relations, serializers
 
</s> remove from rest_framework.compat import Mapping
 </s> add 
from collections.abc import Mapping
  import pickle
  import re
  from collections import ChainMap
from collections.abc import Mapping
  
  import pytest
  from django.db import models
  
  from rest_framework import exceptions, fields, relations, serializers
keep keep add keep keep keep keep keep
 Remove unnecessary compatibility shims from rest_framework/compat.py (#6631)

For Python 3, collections.abc.Mapping and collections.abc.MutableMapping
are always available from the stdlib. 
tests/test_serializer.py