      returning text and apply this decorator to the class.
      """
      if six.PY2:
          klass.__unicode__ = klass.__str__
          klass.__str__ = lambda self: self.__unicode__().encode('utf-8')
      return klass
  
 
</s> remove             if type(self).__unicode__ == Model.__str__:
                klass_name = type(self).__name__
                raise RuntimeError("%s.__unicode__ is aliased to __str__. Did"
                                   " you apply @python_2_unicode_compatible"
                                   " without defining __str__?" % klass_name)
 </s> add  </s> remove @python_2_unicode_compatible
class BrokenArticle(models.Model):
    headline = models.CharField(max_length=100)
    pub_date = models.DateTimeField()

    def __unicode__(self):      # instead of __str__
        return self.headline

 </s> add  </s> remove from django.utils.encoding import force_bytes, force_text, filepath_to_uri
 </s> add from django.utils.encoding import (force_bytes, force_text, filepath_to_uri,
        python_2_unicode_compatible) </s> remove from .models import Article, BrokenArticle, InternationalArticle
 </s> add from .models import Article, InternationalArticle </s> remove @python_2_unicode_compatible
 </s> add 
        if '__str__' not in klass.__dict__:
            raise ValueError("@python_2_unicode_compatible cannot be applied "
                             "to %s because it doesn't define __str__()." %
                             klass.__name__)
      returning text and apply this decorator to the class.
      """
      if six.PY2:
        if '__str__' not in klass.__dict__:
            raise ValueError("@python_2_unicode_compatible cannot be applied "
                             "to %s because it doesn't define __str__()." %
                             klass.__name__)
          klass.__unicode__ = klass.__str__
          klass.__str__ = lambda self: self.__unicode__().encode('utf-8')
      return klass
  
keep keep add keep keep keep keep
 Fixed #21198 -- Prevented invalid use of @python_2_unicode_compatible.

Thanks jpic for the report and chmodas for working on a patch.

Reverts 2ea80b94. Refs #19362. 
django/utils/encoding.py