diegorep / pypng

Automatically exported from code.google.com/p/pypng
0 stars 0 forks source link

Fails on Python 2.3. #27

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
Apropos Issue 23 it seems like it would not be a huge amount of effort to make 
PyPNG work on 
Python 2.3.  So let's do it.

Original issue reported on code.google.com by d...@pobox.com on 18 Mar 2009 at 4:04

GoogleCodeExporter commented 8 years ago
As of revision 35, python2.3 -c 'import png;png.test()' reveals the following:
[several] TypeError: array initializer must be list or string
[once] itertools.tee missing
[once]
  File "/Users/drj/pypng/code/png.py", line 1614, in helperKN
    self.assertEqual(list(itertools.chain(*pixels)),
TypeError: type object argument after * must be a sequence
[once]
  File "/Users/drj/pypng/code/png.py", line 431, in make_palette
    p.extend(x[0:3])
TypeError: can only extend array with array (not "tuple")

The array stuff is a bit gnarly.  Ouch.

Original comment by d...@pobox.com on 18 Mar 2009 at 4:13

GoogleCodeExporter commented 8 years ago
itertools.tee avoided.

Original comment by d...@pobox.com on 18 Mar 2009 at 6:38

GoogleCodeExporter commented 8 years ago
array.array is shimmed.  Bit more heroic than I was expecting, but it works 
beautifully.

Original comment by d...@pobox.com on 18 Mar 2009 at 8:47

GoogleCodeExporter commented 8 years ago

Original comment by d...@pobox.com on 23 Mar 2009 at 8:16

GoogleCodeExporter commented 8 years ago
moved back to "accepted" because tests fail on r67

Original comment by d...@pobox.com on 26 Mar 2009 at 9:46

GoogleCodeExporter commented 8 years ago
Fixed by r68.

Original comment by d...@pobox.com on 26 Mar 2009 at 10:21