  try:
      from itertools import zip_longest
  except ImportError:
      from itertools import izip_longest as zip_longest
  
  from django.db.models.sql import compiler
  
  
  class SQLCompiler(compiler.SQLCompiler):
      def resolve_columns(self, row, fields=()):
 
</s> remove # The izip_longest was renamed to zip_longest in py3
try:
    from itertools import zip_longest
except ImportError:
    from itertools import izip_longest as zip_longest
 </s> add from django.utils.six.moves import zip_longest </s> remove try:
    from itertools import zip_longest
except ImportError:
    from itertools import izip_longest as zip_longest
 </s> add  </s> remove from django.utils.six.moves import zip
 </s> add from django.utils.six.moves import zip, zip_longest





  from django.db.models.sql import compiler
  
  
  class SQLCompiler(compiler.SQLCompiler):
      def resolve_columns(self, row, fields=()):
replace replace replace replace replace keep keep keep keep keep
 Used six.moves.zip_longest, new in six 1.4.0. 
django/db/backends/mysql/compiler.py