  from django.db.backends.util import truncate_name, typecast_date, typecast_timestamp
  from django.db.models.sql import compiler
  from django.db.models.sql.constants import MULTI
  from django.utils import six
  from django.utils.six.moves import zip
  from django.utils import timezone
  
  SQLCompiler = compiler.SQLCompiler
  
  class GeoSQLCompiler(compiler.SQLCompiler):
 
</s> remove try:
    from itertools import zip_longest
except ImportError:
    from itertools import izip_longest as zip_longest
 </s> add  </s> remove try:
    from itertools import zip_longest
except ImportError:
    from itertools import izip_longest as zip_longest

 </s> add  </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
from django.utils.six.moves import zip, zip_longest
  from django.db.backends.util import truncate_name, typecast_date, typecast_timestamp
  from django.db.models.sql import compiler
  from django.db.models.sql.constants import MULTI
  from django.utils import six
from django.utils.six.moves import zip, zip_longest
  from django.utils import timezone
  
  SQLCompiler = compiler.SQLCompiler
  
  class GeoSQLCompiler(compiler.SQLCompiler):
keep keep keep keep replace keep keep keep keep keep
 Used six.moves.zip_longest, new in six 1.4.0. 
django/contrib/gis/db/models/sql/compiler.py