              'change': f('change', model_name),
              'delete': f('delete', model_name)
          }
          for perm in perms.values():
              perm = '{0}.{1}'.format(app_label, perm)
              assign_perm(perm, everyone)
          everyone.user_set.add(*users.values())
  
          # appropriate object level permissions
          readers = Group.objects.create(name='readers')
 
</s> remove         f = '{0}_{1}'.format
 </s> add         f = '{}_{}'.format </s> remove             six.text_type(key): key for key in self.choices
 </s> add             str(key): key for key in self.choices </s> remove class ErrorDetail(six.text_type):
 </s> add class ErrorDetail(str): </s> remove             path = urlparse.urlparse(link.url).path
 </s> add             path = parse.urlparse(link.url).path </s> remove             for name, value in six.iteritems(headers):
 </s> add             for name, value in headers.items():
            perm = '{}.{}'.format(app_label, perm)
              'change': f('change', model_name),
              'delete': f('delete', model_name)
          }
          for perm in perms.values():
            perm = '{}.{}'.format(app_label, perm)
              assign_perm(perm, everyone)
          everyone.user_set.add(*users.values())
  
          # appropriate object level permissions
          readers = Group.objects.create(name='readers')
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_permissions.py