Commit Graph

7 Commits

Author SHA1 Message Date
Brian Crowell
48cf699fe6 py3k: Change apply() to unpacking syntax
apply() is no longer available in py3k.
2013-01-10 08:46:52 -06:00
Brian Crowell
260c1fad14 py3k: Convert StringIO.StringIO to io.BytesIO
io.BytesIO is already in 2.6. Some of the more obvious bytes literals are
marked in this commit.
2013-01-10 08:46:51 -06:00
Brian Crowell
dda0e9a3ed py3k: Tkinter module is now tkinter 2013-01-10 08:46:51 -06:00
Brian Crowell
83ff0b3b31 py3k: Use relative imports
In py3k, imports are absolute unless using the "from . import" syntax.

This commit also solves a recursive import between Image, ImageColor, and
ImagePalette by delay-importing ImagePalette in Image.

I'm not too keen on this commit because the syntax is ugly. I might go back
and prefer the prettier "from PIL import".
2013-01-10 08:46:48 -06:00
Brian Crowell
09f1081c95 py3k: Fix up uses of dictionary views, ranges, and has_key()
y.has_key(x) is gone (use x in y), and keys(), values(), items(), and
range() all return views.

Some iterables needed to be packed into lists, either because the code
expected a list (such as "range(256) * 3") or because the original
collection was being modified (automatic global declarations).

The Tiff ImageFileDictionary is a special case and will be dealt with in
another commit.
2013-01-10 08:46:42 -06:00
Brian Crowell
78575798d7 py3k: Update exception usage to modern syntax 2013-01-10 08:46:33 -06:00
Alex Clark
9a640e3157 Forking PIL 2010-07-30 22:52:47 -04:00