From 4e2de9d9edb633da2607bfc59e826a2d2e726ef2 Mon Sep 17 00:00:00 2001 From: Andrew Murray Date: Sat, 23 May 2015 20:28:41 +1000 Subject: [PATCH] Added missing future print imports and removed unnecessary imports --- PIL/ImageFont.py | 2 -- PIL/PSDraw.py | 2 -- PIL/PcxImagePlugin.py | 4 +++- Scripts/createfontdatachunk.py | 1 + Tests/import_all.py | 1 + Tests/make_hash.py | 2 ++ Tests/test_file_libtiff.py | 1 + Tests/test_file_tiff.py | 1 + Tests/test_format_hsv.py | 1 + Tests/test_imagemath.py | 1 + Tests/test_numpy.py | 1 + Tests/threaded_save.py | 1 + Tests/versions.py | 1 + mp_compile.py | 1 + 14 files changed, 15 insertions(+), 5 deletions(-) diff --git a/PIL/ImageFont.py b/PIL/ImageFont.py index 1e5a27f7b..dfcbbeaca 100644 --- a/PIL/ImageFont.py +++ b/PIL/ImageFont.py @@ -25,8 +25,6 @@ # See the README file for information on usage and redistribution. # -from __future__ import print_function - from PIL import Image from PIL._util import isDirectory, isPath import os diff --git a/PIL/PSDraw.py b/PIL/PSDraw.py index 6187e40ad..0f4495fe3 100644 --- a/PIL/PSDraw.py +++ b/PIL/PSDraw.py @@ -15,8 +15,6 @@ # See the README file for information on usage and redistribution. # -from __future__ import print_function - from PIL import EpsImagePlugin diff --git a/PIL/PcxImagePlugin.py b/PIL/PcxImagePlugin.py index 8eac6a594..40fafa0dc 100644 --- a/PIL/PcxImagePlugin.py +++ b/PIL/PcxImagePlugin.py @@ -25,7 +25,7 @@ # See the README file for information on usage and redistribution. # -__version__ = "0.6" +from __future__ import print_function from PIL import Image, ImageFile, ImagePalette, _binary @@ -33,6 +33,8 @@ i8 = _binary.i8 i16 = _binary.i16le o8 = _binary.o8 +__version__ = "0.6" + def _accept(prefix): return i8(prefix[0]) == 10 and i8(prefix[1]) in [0, 2, 3, 5] diff --git a/Scripts/createfontdatachunk.py b/Scripts/createfontdatachunk.py index 0c860701a..b9514eb6e 100644 --- a/Scripts/createfontdatachunk.py +++ b/Scripts/createfontdatachunk.py @@ -1,3 +1,4 @@ +from __future__ import print_function import base64 import os import sys diff --git a/Tests/import_all.py b/Tests/import_all.py index d8299d969..88a102b64 100644 --- a/Tests/import_all.py +++ b/Tests/import_all.py @@ -1,3 +1,4 @@ +from __future__ import print_function import sys sys.path.insert(0, ".") diff --git a/Tests/make_hash.py b/Tests/make_hash.py index 88bb2994b..a92886df9 100644 --- a/Tests/make_hash.py +++ b/Tests/make_hash.py @@ -1,5 +1,7 @@ # brute-force search for access descriptor hash table +from __future__ import print_function + modes = [ "1", "L", "LA", diff --git a/Tests/test_file_libtiff.py b/Tests/test_file_libtiff.py index 4f798675b..896038b9d 100644 --- a/Tests/test_file_libtiff.py +++ b/Tests/test_file_libtiff.py @@ -1,3 +1,4 @@ +from __future__ import print_function from helper import unittest, PillowTestCase, hopper, py3 import os diff --git a/Tests/test_file_tiff.py b/Tests/test_file_tiff.py index b885780d6..c51f46a04 100644 --- a/Tests/test_file_tiff.py +++ b/Tests/test_file_tiff.py @@ -1,3 +1,4 @@ +from __future__ import print_function from helper import unittest, PillowTestCase, hopper, py3 from PIL import Image, TiffImagePlugin diff --git a/Tests/test_format_hsv.py b/Tests/test_format_hsv.py index d9baf91bf..dd4413f41 100644 --- a/Tests/test_format_hsv.py +++ b/Tests/test_format_hsv.py @@ -1,3 +1,4 @@ +from __future__ import print_function from helper import unittest, PillowTestCase, hopper from PIL import Image diff --git a/Tests/test_imagemath.py b/Tests/test_imagemath.py index 5d87c0229..4ca4e2c6c 100644 --- a/Tests/test_imagemath.py +++ b/Tests/test_imagemath.py @@ -1,3 +1,4 @@ +from __future__ import print_function from helper import unittest, PillowTestCase from PIL import Image diff --git a/Tests/test_numpy.py b/Tests/test_numpy.py index f010e0df5..19b9a2014 100644 --- a/Tests/test_numpy.py +++ b/Tests/test_numpy.py @@ -1,3 +1,4 @@ +from __future__ import print_function from helper import unittest, PillowTestCase, hopper from PIL import Image diff --git a/Tests/threaded_save.py b/Tests/threaded_save.py index 3bcbdd0b0..ba8b17dbc 100644 --- a/Tests/threaded_save.py +++ b/Tests/threaded_save.py @@ -1,3 +1,4 @@ +from __future__ import print_function from PIL import Image import io diff --git a/Tests/versions.py b/Tests/versions.py index e367ae46a..89be1d7c8 100644 --- a/Tests/versions.py +++ b/Tests/versions.py @@ -1,3 +1,4 @@ +from __future__ import print_function from PIL import Image diff --git a/mp_compile.py b/mp_compile.py index 892452558..a930f4245 100644 --- a/mp_compile.py +++ b/mp_compile.py @@ -1,6 +1,7 @@ # A monkey patch of the base distutils.ccompiler to use parallel builds # Tested on 2.7, looks to be identical to 3.3. +from __future__ import print_function from multiprocessing import Pool, cpu_count from distutils.ccompiler import CCompiler import os