booglybob / pyglet

Automatically exported from code.google.com/p/pyglet
BSD 3-Clause "New" or "Revised" License
0 stars 0 forks source link

2to3 convertsizip_longest to zip_longest #696

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
This is Python 3.3.2.

2to3 converts pyglet.compat.izip_longest to zip_longest in 
pyglet.image.codecs.dds:

Traceback (most recent call last):
  File "test_pyglet_error.py", line 4, in <module>
    l.image("rgb_16bpp.bmp")
  File "/home/reidrac/src/pyglet-upstream/_build/lib/pyglet/resource.py", line 519, in image
    atlas=atlas)
  File "/home/reidrac/src/pyglet-upstream/_build/lib/pyglet/resource.py", line 453, in _alloc_image
    img = pyglet.image.load(name, file=file)
  File "/home/reidrac/src/pyglet-upstream/_build/lib/pyglet/image/__init__.py", line 192, in load
    image = decoder.decode(file, filename)
  File "/home/reidrac/src/pyglet-upstream/_build/lib/pyglet/image/codecs/dds.py", line 163, in decode
    desc = DDSURFACEDESC2(header)
  File "/home/reidrac/src/pyglet-upstream/_build/lib/pyglet/image/codecs/dds.py", line 127, in __init__
    super(DDSURFACEDESC2, self).__init__(data)
  File "/home/reidrac/src/pyglet-upstream/_build/lib/pyglet/image/codecs/dds.py", line 90, in __init__
    for field, value in zip_longest(self._fields, items, fillvalue=None):
NameError: global name 'zip_longest' is not defined

Original issue reported on code.google.com by useboxnet on 3 Jan 2014 at 3:09

GoogleCodeExporter commented 8 years ago
It was a bug in 2to3 in Python 3.2 and it's been fixed: 
http://bugs.python.org/issue11438

Original comment by useboxnet on 3 Jan 2014 at 3:14

GoogleCodeExporter commented 8 years ago
Our pyglet.compat seems to be OK after the 2to3 conversion, so I made a small 
change in pyglet.image.codecs.dds so 2to3 doesn't mess it up.

Shouldn't make any difference with Python 3.2.

Original comment by useboxnet on 3 Jan 2014 at 3:22

GoogleCodeExporter commented 8 years ago
This issue was closed by revision 532b754840bd.

Original comment by useboxnet on 3 Jan 2014 at 3:23