  import inspect
  import traceback
  from collections import OrderedDict
  
  from django.core.exceptions import ImproperlyConfigured
  from django.core.exceptions import ValidationError as DjangoValidationError
  from django.db import models
 
</s> remove from rest_framework.compat import Mapping, postgres_fields
 </s> add from rest_framework.compat import postgres_fields </s> remove from rest_framework.compat import Mapping
 </s> add 
from collections.abc import Mapping
  import inspect
  import traceback
  from collections import OrderedDict
from collections.abc import Mapping
  
  from django.core.exceptions import ImproperlyConfigured
  from django.core.exceptions import ValidationError as DjangoValidationError
  from django.db import models
keep keep add 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. 
rest_framework/serializers.py