diff --git a/PIL/ContainerIO.py b/PIL/ContainerIO.py
index dcedcd6dd..262f2afb9 100644
--- a/PIL/ContainerIO.py
+++ b/PIL/ContainerIO.py
@@ -19,7 +19,7 @@
# file (for example a TAR file).
-class ContainerIO:
+class ContainerIO(object):
##
# Create file object.
diff --git a/PIL/EpsImagePlugin.py b/PIL/EpsImagePlugin.py
index e2e7fa5e9..7b1f4c1ca 100644
--- a/PIL/EpsImagePlugin.py
+++ b/PIL/EpsImagePlugin.py
@@ -157,7 +157,7 @@ def Ghostscript(tile, size, fp, scale=1):
return im
-class PSFile:
+class PSFile(object):
"""
Wrapper for bytesio object that treats either CR or LF as end of line.
"""
@@ -365,7 +365,7 @@ def _save(im, fp, filename, eps=1):
else:
raise ValueError("image mode is not supported")
- class NoCloseStream:
+ class NoCloseStream(object):
def __init__(self, fp):
self.fp = fp
diff --git a/PIL/FontFile.py b/PIL/FontFile.py
index 5cf688256..db8e6bec1 100644
--- a/PIL/FontFile.py
+++ b/PIL/FontFile.py
@@ -31,7 +31,7 @@ def puti16(fp, values):
##
# Base class for raster font file handlers.
-class FontFile:
+class FontFile(object):
bitmap = None
diff --git a/PIL/GifImagePlugin.py b/PIL/GifImagePlugin.py
index 8db42e8e8..d2b2f7fee 100644
--- a/PIL/GifImagePlugin.py
+++ b/PIL/GifImagePlugin.py
@@ -496,7 +496,7 @@ def getdata(im, offset=(0, 0), **params):
The first string is a local image header, the rest contains
encoded image data."""
- class Collector:
+ class Collector(object):
data = []
def write(self, data):
diff --git a/PIL/GimpGradientFile.py b/PIL/GimpGradientFile.py
index 696f425f1..45af573bb 100644
--- a/PIL/GimpGradientFile.py
+++ b/PIL/GimpGradientFile.py
@@ -58,7 +58,7 @@ def sphere_decreasing(middle, pos):
SEGMENTS = [linear, curved, sine, sphere_increasing, sphere_decreasing]
-class GradientFile:
+class GradientFile(object):
gradient = None
diff --git a/PIL/GimpPaletteFile.py b/PIL/GimpPaletteFile.py
index a066c80cc..4bf3ca36a 100644
--- a/PIL/GimpPaletteFile.py
+++ b/PIL/GimpPaletteFile.py
@@ -21,7 +21,7 @@ from PIL._binary import o8
##
# File handler for GIMP's palette format.
-class GimpPaletteFile:
+class GimpPaletteFile(object):
rawmode = "RGB"
diff --git a/PIL/IcnsImagePlugin.py b/PIL/IcnsImagePlugin.py
index 1bb1066d8..e0b130e81 100644
--- a/PIL/IcnsImagePlugin.py
+++ b/PIL/IcnsImagePlugin.py
@@ -130,7 +130,7 @@ def read_png_or_jpeg2000(fobj, start_length, size):
raise ValueError('Unsupported icon subimage format')
-class IcnsFile:
+class IcnsFile(object):
SIZES = {
(512, 512, 2): [
diff --git a/PIL/IcoImagePlugin.py b/PIL/IcoImagePlugin.py
index c4e24d99c..8a2144463 100644
--- a/PIL/IcoImagePlugin.py
+++ b/PIL/IcoImagePlugin.py
@@ -79,7 +79,7 @@ def _accept(prefix):
return prefix[:4] == _MAGIC
-class IcoFile:
+class IcoFile(object):
def __init__(self, buf):
"""
Parse image from file-like object containing ico file data
diff --git a/PIL/Image.py b/PIL/Image.py
index 37428ec30..274e7ee0e 100644
--- a/PIL/Image.py
+++ b/PIL/Image.py
@@ -35,7 +35,7 @@ class DecompressionBombWarning(RuntimeWarning):
pass
-class _imaging_not_installed:
+class _imaging_not_installed(object):
# module placeholder
def __getattr__(self, id):
raise ImportError("The _imaging C module is not installed")
@@ -443,7 +443,7 @@ def coerce_e(value):
return value if isinstance(value, _E) else _E(value)
-class _E:
+class _E(object):
def __init__(self, data):
self.data = data
@@ -478,7 +478,7 @@ def _getscaleoffset(expr):
# --------------------------------------------------------------------
# Implementation wrapper
-class Image:
+class Image(object):
"""
This class represents an image object. To create
:py:class:`~PIL.Image.Image` objects, use the appropriate factory
@@ -1975,12 +1975,12 @@ class _ImageCrop(Image):
# --------------------------------------------------------------------
# Abstract handlers.
-class ImagePointHandler:
+class ImagePointHandler(object):
# used as a mixin by point transforms (for use with im.point)
pass
-class ImageTransformHandler:
+class ImageTransformHandler(object):
# used as a mixin by geometry transforms (for use with im.transform)
pass
diff --git a/PIL/ImageCms.py b/PIL/ImageCms.py
index ed219f7ba..6cd2f5d2d 100644
--- a/PIL/ImageCms.py
+++ b/PIL/ImageCms.py
@@ -147,7 +147,7 @@ for flag in FLAGS.values():
##
# Profile.
-class ImageCmsProfile:
+class ImageCmsProfile(object):
def __init__(self, profile):
"""
diff --git a/PIL/ImageDraw.py b/PIL/ImageDraw.py
index a2a75d1c6..1fc5b4d61 100644
--- a/PIL/ImageDraw.py
+++ b/PIL/ImageDraw.py
@@ -47,7 +47,7 @@ except ImportError:
# Application code should use the Draw factory, instead of
# directly.
-class ImageDraw:
+class ImageDraw(object):
##
# Create a drawing instance.
diff --git a/PIL/ImageDraw2.py b/PIL/ImageDraw2.py
index c967a200f..62ee11630 100644
--- a/PIL/ImageDraw2.py
+++ b/PIL/ImageDraw2.py
@@ -19,25 +19,25 @@
from PIL import Image, ImageColor, ImageDraw, ImageFont, ImagePath
-class Pen:
+class Pen(object):
def __init__(self, color, width=1, opacity=255):
self.color = ImageColor.getrgb(color)
self.width = width
-class Brush:
+class Brush(object):
def __init__(self, color, opacity=255):
self.color = ImageColor.getrgb(color)
-class Font:
+class Font(object):
def __init__(self, color, file, size=12):
# FIXME: add support for bitmap fonts
self.color = ImageColor.getrgb(color)
self.font = ImageFont.truetype(file, size)
-class Draw:
+class Draw(object):
def __init__(self, image, size=None, color=None):
if not hasattr(image, "im"):
diff --git a/PIL/ImageEnhance.py b/PIL/ImageEnhance.py
index 8c0f166f3..fbacbee8f 100644
--- a/PIL/ImageEnhance.py
+++ b/PIL/ImageEnhance.py
@@ -21,7 +21,7 @@
from PIL import Image, ImageFilter, ImageStat
-class _Enhance:
+class _Enhance(object):
def enhance(self, factor):
"""
diff --git a/PIL/ImageFile.py b/PIL/ImageFile.py
index 01c3e0303..b1d261166 100644
--- a/PIL/ImageFile.py
+++ b/PIL/ImageFile.py
@@ -311,7 +311,7 @@ class StubImageFile(ImageFile):
)
-class Parser:
+class Parser(object):
"""
Incremental image parser. This class implements the standard
feed/close consumer interface.
diff --git a/PIL/ImageFont.py b/PIL/ImageFont.py
index 1e5a27f7b..58889b6e5 100644
--- a/PIL/ImageFont.py
+++ b/PIL/ImageFont.py
@@ -38,7 +38,7 @@ except ImportError:
warnings = None
-class _imagingft_not_installed:
+class _imagingft_not_installed(object):
# module placeholder
def __getattr__(self, id):
raise ImportError("The _imagingft C module is not installed")
@@ -64,7 +64,7 @@ except ImportError:
# --------------------------------------------------------------------
-class ImageFont:
+class ImageFont(object):
"PIL font wrapper"
def _load_pilfont(self, filename):
@@ -120,7 +120,7 @@ class ImageFont:
# Wrapper for FreeType fonts. Application code should use the
# truetype factory function to create font objects.
-class FreeTypeFont:
+class FreeTypeFont(object):
"FreeType font wrapper (requires _imagingft service)"
def __init__(self, font=None, size=10, index=0, encoding="", file=None):
@@ -193,7 +193,7 @@ class FreeTypeFont:
# Image.ROTATE_90, Image.ROTATE_180, or Image.ROTATE_270.
-class TransposedFont:
+class TransposedFont(object):
"Wrapper for writing rotated or mirrored text"
def __init__(self, font, orientation=None):
diff --git a/PIL/ImageMath.py b/PIL/ImageMath.py
index 4dcc5125c..f92d5001f 100644
--- a/PIL/ImageMath.py
+++ b/PIL/ImageMath.py
@@ -31,7 +31,7 @@ def _isconstant(v):
return isinstance(v, int) or isinstance(v, float)
-class _Operand:
+class _Operand(object):
# wraps an image operand, providing standard operators
def __init__(self, im):
diff --git a/PIL/ImageMode.py b/PIL/ImageMode.py
index 295069108..d8960017b 100644
--- a/PIL/ImageMode.py
+++ b/PIL/ImageMode.py
@@ -20,7 +20,7 @@ _modes = {}
##
# Wrapper for mode strings.
-class ModeDescriptor:
+class ModeDescriptor(object):
def __init__(self, mode, bands, basemode, basetype):
self.mode = mode
diff --git a/PIL/ImageMorph.py b/PIL/ImageMorph.py
index 996eacb7d..6f92e9e67 100644
--- a/PIL/ImageMorph.py
+++ b/PIL/ImageMorph.py
@@ -12,7 +12,7 @@ import re
LUT_SIZE = 1 << 9
-class LutBuilder:
+class LutBuilder(object):
"""A class for building a MorphLut from a descriptive language
The input patterns is a list of a strings sequences like these::
@@ -176,7 +176,7 @@ class LutBuilder:
return self.lut
-class MorphOp:
+class MorphOp(object):
"""A class for binary morphological operators"""
def __init__(self,
diff --git a/PIL/ImagePalette.py b/PIL/ImagePalette.py
index c6c05d162..b2f51dd06 100644
--- a/PIL/ImagePalette.py
+++ b/PIL/ImagePalette.py
@@ -21,7 +21,7 @@ import warnings
from PIL import ImageColor
-class ImagePalette:
+class ImagePalette(object):
"Color palette for palette mapped images"
def __init__(self, mode="RGB", palette=None, size=0):
diff --git a/PIL/ImagePath.py b/PIL/ImagePath.py
index 656d5ce61..f23d01430 100644
--- a/PIL/ImagePath.py
+++ b/PIL/ImagePath.py
@@ -20,7 +20,7 @@ from PIL import Image
# the Python class below is overridden by the C implementation.
-class Path:
+class Path(object):
def __init__(self, xy):
pass
diff --git a/PIL/ImageSequence.py b/PIL/ImageSequence.py
index dd01e2902..256bcbedb 100644
--- a/PIL/ImageSequence.py
+++ b/PIL/ImageSequence.py
@@ -16,7 +16,7 @@
##
-class Iterator:
+class Iterator(object):
"""
This class implements an iterator object that can be used to loop
over an image sequence.
diff --git a/PIL/ImageShow.py b/PIL/ImageShow.py
index 9527dbf97..51417c30b 100644
--- a/PIL/ImageShow.py
+++ b/PIL/ImageShow.py
@@ -56,7 +56,7 @@ def show(image, title=None, **options):
##
# Base class for viewers.
-class Viewer:
+class Viewer(object):
# main api
diff --git a/PIL/ImageStat.py b/PIL/ImageStat.py
index 37e7515d4..f3c138b3a 100644
--- a/PIL/ImageStat.py
+++ b/PIL/ImageStat.py
@@ -26,7 +26,7 @@ import operator
import functools
-class Stat:
+class Stat(object):
def __init__(self, image_or_list, mask=None):
try:
diff --git a/PIL/ImageTk.py b/PIL/ImageTk.py
index 5fb5ecff3..68d388e74 100644
--- a/PIL/ImageTk.py
+++ b/PIL/ImageTk.py
@@ -56,7 +56,7 @@ def _pilbitmap_check():
# --------------------------------------------------------------------
# PhotoImage
-class PhotoImage:
+class PhotoImage(object):
"""
A Tkinter-compatible photo image. This can be used
everywhere Tkinter expects an image object. If the image is an RGBA
@@ -190,7 +190,7 @@ class PhotoImage:
# BitmapImage
-class BitmapImage:
+class BitmapImage(object):
"""
A Tkinter-compatible bitmap image. This can be used everywhere Tkinter
diff --git a/PIL/ImageWin.py b/PIL/ImageWin.py
index 300d118c9..bcb54bc3e 100644
--- a/PIL/ImageWin.py
+++ b/PIL/ImageWin.py
@@ -21,7 +21,7 @@ import warnings
from PIL import Image
-class HDC:
+class HDC(object):
"""
Wraps an HDC integer. The resulting object can be passed to the
:py:meth:`~PIL.ImageWin.Dib.draw` and :py:meth:`~PIL.ImageWin.Dib.expose`
@@ -34,7 +34,7 @@ class HDC:
return self.dc
-class HWND:
+class HWND(object):
"""
Wraps an HWND integer. The resulting object can be passed to the
:py:meth:`~PIL.ImageWin.Dib.draw` and :py:meth:`~PIL.ImageWin.Dib.expose`
@@ -47,7 +47,7 @@ class HWND:
return self.wnd
-class Dib:
+class Dib(object):
"""
A Windows bitmap with the given mode and size. The mode can be one of "1",
"L", "P", or "RGB".
@@ -206,7 +206,7 @@ class Dib:
##
# Create a Window with the given title size.
-class Window:
+class Window(object):
def __init__(self, title="PIL", width=None, height=None):
self.hwnd = Image.core.createwindow(
diff --git a/PIL/IptcImagePlugin.py b/PIL/IptcImagePlugin.py
index aa0193894..47c7e1936 100644
--- a/PIL/IptcImagePlugin.py
+++ b/PIL/IptcImagePlugin.py
@@ -251,7 +251,7 @@ def getiptcinfo(im):
return None # no properties
# create an IptcImagePlugin object without initializing it
- class FakeImage:
+ class FakeImage(object):
pass
im = FakeImage()
im.__class__ = IptcImageFile
diff --git a/PIL/MpegImagePlugin.py b/PIL/MpegImagePlugin.py
index 9aca58f16..ff7c0dce4 100644
--- a/PIL/MpegImagePlugin.py
+++ b/PIL/MpegImagePlugin.py
@@ -22,7 +22,7 @@ from PIL._binary import i8
#
# Bitstream parser
-class BitStream:
+class BitStream(object):
def __init__(self, fp):
self.fp = fp
diff --git a/PIL/OleFileIO.py b/PIL/OleFileIO.py
index c804dd454..d3c1cd9a0 100755
--- a/PIL/OleFileIO.py
+++ b/PIL/OleFileIO.py
@@ -473,7 +473,7 @@ def filetime2datetime(filetime):
#=== CLASSES ==================================================================
-class OleMetadata:
+class OleMetadata(object):
"""
class to parse and store metadata from standard properties of OLE files.
@@ -757,7 +757,7 @@ class _OleStream(io.BytesIO):
#--- _OleDirectoryEntry -------------------------------------------------------
-class _OleDirectoryEntry:
+class _OleDirectoryEntry(object):
"""
OLE2 Directory Entry
@@ -1007,7 +1007,7 @@ class _OleDirectoryEntry:
#--- OleFileIO ----------------------------------------------------------------
-class OleFileIO:
+class OleFileIO(object):
"""
OLE container object
diff --git a/PIL/PSDraw.py b/PIL/PSDraw.py
index 6187e40ad..66e3d7982 100644
--- a/PIL/PSDraw.py
+++ b/PIL/PSDraw.py
@@ -23,7 +23,7 @@ from PIL import EpsImagePlugin
##
# Simple Postscript graphics interface.
-class PSDraw:
+class PSDraw(object):
"""
Sets up printing to the given file. If **file** is omitted,
:py:attr:`sys.stdout` is assumed.
diff --git a/PIL/PaletteFile.py b/PIL/PaletteFile.py
index 37ba4cbff..ef50feefd 100644
--- a/PIL/PaletteFile.py
+++ b/PIL/PaletteFile.py
@@ -19,7 +19,7 @@ from PIL._binary import o8
##
# File handler for Teragon-style palette files.
-class PaletteFile:
+class PaletteFile(object):
rawmode = "RGB"
diff --git a/PIL/PdfImagePlugin.py b/PIL/PdfImagePlugin.py
index 5113f099e..1d8c2ff93 100644
--- a/PIL/PdfImagePlugin.py
+++ b/PIL/PdfImagePlugin.py
@@ -63,7 +63,7 @@ def _save(im, fp, filename):
xref = [0]*(5+1) # placeholders
- class TextWriter:
+ class TextWriter(object):
def __init__(self, fp):
self.fp = fp
diff --git a/PIL/PngImagePlugin.py b/PIL/PngImagePlugin.py
index 398a01f33..53d38eecd 100644
--- a/PIL/PngImagePlugin.py
+++ b/PIL/PngImagePlugin.py
@@ -90,7 +90,7 @@ def _safe_zlib_decompress(s):
# --------------------------------------------------------------------
# Support classes. Suitable for PNG and related formats like MNG etc.
-class ChunkStream:
+class ChunkStream(object):
def __init__(self, fp):
@@ -183,7 +183,7 @@ class iTXt(str):
return self
-class PngInfo:
+class PngInfo(object):
"""
PNG chunk container (for use with save(pnginfo=))
@@ -620,7 +620,7 @@ def putchunk(fp, cid, *data):
fp.write(o16(hi) + o16(lo))
-class _idat:
+class _idat(object):
# wrap output from the encoder in IDAT chunks
def __init__(self, fp, chunk):
@@ -771,7 +771,7 @@ def _save(im, fp, filename, chunk=putchunk, check=0):
def getchunks(im, **params):
"""Return a list of PNG chunks representing this image."""
- class collector:
+ class collector(object):
data = []
def write(self, data):
diff --git a/PIL/WmfImagePlugin.py b/PIL/WmfImagePlugin.py
index 6146c1560..bdbbc72f0 100644
--- a/PIL/WmfImagePlugin.py
+++ b/PIL/WmfImagePlugin.py
@@ -37,7 +37,7 @@ def register_handler(handler):
if hasattr(Image.core, "drawwmf"):
# install default handler (windows only)
- class WmfHandler:
+ class WmfHandler(object):
def open(self, im):
im.mode = "RGB"
diff --git a/Scripts/explode.py b/Scripts/explode.py
index 0460fa020..53436100b 100644
--- a/Scripts/explode.py
+++ b/Scripts/explode.py
@@ -13,7 +13,7 @@ import os
import sys
-class Interval:
+class Interval(object):
def __init__(self, interval="0"):
diff --git a/Scripts/gifmaker.py b/Scripts/gifmaker.py
index 8777f74f6..5d1781499 100644
--- a/Scripts/gifmaker.py
+++ b/Scripts/gifmaker.py
@@ -50,7 +50,7 @@ from PIL.GifImagePlugin import getheader, getdata
# sequence iterator
-class image_sequence:
+class image_sequence(object):
def __init__(self, im):
self.im = im
diff --git a/Scripts/pildriver.py b/Scripts/pildriver.py
index bb01004f5..32989ccdf 100644
--- a/Scripts/pildriver.py
+++ b/Scripts/pildriver.py
@@ -53,7 +53,7 @@ from __future__ import print_function
from PIL import Image
-class PILDriver:
+class PILDriver(object):
verbose = 0
diff --git a/Tests/test_file_iptc.py b/Tests/test_file_iptc.py
index 14eb135aa..84fa873be 100644
--- a/Tests/test_file_iptc.py
+++ b/Tests/test_file_iptc.py
@@ -11,7 +11,7 @@ class TestFileIptc(PillowTestCase):
def dummy_IptcImagePlugin(self):
# Create an IptcImagePlugin object without initializing it
- class FakeImage:
+ class FakeImage(object):
pass
im = FakeImage()
im.__class__ = IptcImagePlugin.IptcImageFile
diff --git a/Tests/test_imagefileio.py b/Tests/test_imagefileio.py
index f18474403..b06178437 100644
--- a/Tests/test_imagefileio.py
+++ b/Tests/test_imagefileio.py
@@ -8,7 +8,7 @@ class TestImageFileIo(PillowTestCase):
def test_fileio(self):
- class DumbFile:
+ class DumbFile(object):
def __init__(self, data):
self.data = data
diff --git a/Tests/test_imagefont.py b/Tests/test_imagefont.py
index 49aa9c8b2..88858c717 100644
--- a/Tests/test_imagefont.py
+++ b/Tests/test_imagefont.py
@@ -15,7 +15,7 @@ try:
from PIL import ImageFont
ImageFont.core.getfont # check if freetype is available
- class SimplePatcher():
+ class SimplePatcher(object):
def __init__(self, parent_obj, attr_name, value):
self._parent_obj = parent_obj
self._attr_name = attr_name
diff --git a/Tests/test_imageops.py b/Tests/test_imageops.py
index 0ffb14bfe..396f0da6c 100644
--- a/Tests/test_imageops.py
+++ b/Tests/test_imageops.py
@@ -5,7 +5,7 @@ from PIL import ImageOps
class TestImageOps(PillowTestCase):
- class Deformer:
+ class Deformer(object):
def getmesh(self, im):
x, y = im.size
return [((0, 0, x, y), (0, 0, x, 0, x, y, y, 0))]