                   swappable=True, **kwargs):
          try:
              to._meta
          except AttributeError:
              assert isinstance(to, six.string_types), (
                  "%s(%r) is invalid. First parameter to ManyToManyField must be "
                  "either a model, a model name, or the string %r" %
                  (self.__class__.__name__, to, RECURSIVE_RELATIONSHIP_CONSTANT)
              )
              # Class names must be ASCII in Python 2.x, so we forcibly coerce it
 
</s> remove             # Class names must be ASCII in Python 2.x, so we forcibly coerce it
            # here to break early if there's a problem.
            to = str(to)
 </s> add  </s> remove             assert isinstance(to, six.string_types), (
 </s> add             assert isinstance(to, str), ( </s> remove     if isinstance(data_source, six.string_types):
 </s> add     if isinstance(data_source, str): </s> remove     if isinstance(pattern, six.string_types):
 </s> add     if isinstance(pattern, str): </s> remove from django.utils import six


 </s> add 
            assert isinstance(to, str), (
                   swappable=True, **kwargs):
          try:
              to._meta
          except AttributeError:
            assert isinstance(to, str), (
                  "%s(%r) is invalid. First parameter to ManyToManyField must be "
                  "either a model, a model name, or the string %r" %
                  (self.__class__.__name__, to, RECURSIVE_RELATIONSHIP_CONSTANT)
              )
              # Class names must be ASCII in Python 2.x, so we forcibly coerce it
keep keep keep keep replace keep keep keep keep keep
 Refs #23919 -- Removed six.<various>_types usage

Thanks Tim Graham and Simon Charette for the reviews. 
django/db/models/fields/related.py