Remove deprecated __version__ from plugins

This commit is contained in:
Hugo 2019-11-05 17:00:34 +02:00
parent 9c78c3f972
commit 0c5895470c
35 changed files with 2 additions and 154 deletions

View File

@ -27,10 +27,6 @@
from . import Image, ImageFile, ImagePalette from . import Image, ImageFile, ImagePalette
from ._binary import i8, i16le as i16, i32le as i32, o8, o16le as o16, o32le as o32 from ._binary import i8, i16le as i16, i32le as i32, o8, o16le as o16, o32le as o32
# __version__ is deprecated and will be removed in a future version. Use
# PIL.__version__ instead.
__version__ = "0.7"
# #
# -------------------------------------------------------------------- # --------------------------------------------------------------------
# Read BMP file # Read BMP file

View File

@ -21,10 +21,6 @@ from __future__ import print_function
from . import BmpImagePlugin, Image from . import BmpImagePlugin, Image
from ._binary import i8, i16le as i16, i32le as i32 from ._binary import i8, i16le as i16, i32le as i32
# __version__ is deprecated and will be removed in a future version. Use
# PIL.__version__ instead.
__version__ = "0.1"
# #
# -------------------------------------------------------------------- # --------------------------------------------------------------------

View File

@ -25,10 +25,6 @@ from . import Image
from ._binary import i32le as i32 from ._binary import i32le as i32
from .PcxImagePlugin import PcxImageFile from .PcxImagePlugin import PcxImageFile
# __version__ is deprecated and will be removed in a future version. Use
# PIL.__version__ instead.
__version__ = "0.2"
MAGIC = 0x3ADE68B1 # QUIZ: what's this value, then? MAGIC = 0x3ADE68B1 # QUIZ: what's this value, then?

View File

@ -30,10 +30,6 @@ import tempfile
from . import Image, ImageFile from . import Image, ImageFile
from ._binary import i32le as i32 from ._binary import i32le as i32
# __version__ is deprecated and will be removed in a future version. Use
# PIL.__version__ instead.
__version__ = "0.5"
# #
# -------------------------------------------------------------------- # --------------------------------------------------------------------

View File

@ -19,11 +19,6 @@
from . import Image, ImageFile, ImagePalette from . import Image, ImageFile, ImagePalette
from ._binary import i8, i16le as i16, i32le as i32, o8 from ._binary import i8, i16le as i16, i32le as i32, o8
# __version__ is deprecated and will be removed in a future version. Use
# PIL.__version__ instead.
__version__ = "0.2"
# #
# decoder # decoder

View File

@ -22,10 +22,6 @@ import olefile
from . import Image, ImageFile from . import Image, ImageFile
from ._binary import i8, i32le as i32 from ._binary import i8, i32le as i32
# __version__ is deprecated and will be removed in a future version. Use
# PIL.__version__ instead.
__version__ = "0.1"
# we map from colour field tuples to (mode, rawmode) descriptors # we map from colour field tuples to (mode, rawmode) descriptors
MODES = { MODES = {
# opacity # opacity

View File

@ -26,11 +26,6 @@
from . import ImageFile, ImagePalette from . import ImageFile, ImagePalette
from ._binary import i8, i16be as i16, i32be as i32 from ._binary import i8, i16be as i16, i32be as i32
# __version__ is deprecated and will be removed in a future version. Use
# PIL.__version__ instead.
__version__ = "0.1"
## ##
# Image plugin for the GD uncompressed format. Note that this format # Image plugin for the GD uncompressed format. Note that this format
# is not supported by the standard <b>Image.open</b> function. To use # is not supported by the standard <b>Image.open</b> function. To use

View File

@ -31,11 +31,6 @@ import subprocess
from . import Image, ImageChops, ImageFile, ImagePalette, ImageSequence from . import Image, ImageChops, ImageFile, ImagePalette, ImageSequence
from ._binary import i8, i16le as i16, o8, o16le as o16 from ._binary import i8, i16le as i16, o8, o16le as o16
# __version__ is deprecated and will be removed in a future version. Use
# PIL.__version__ instead.
__version__ = "0.9"
# -------------------------------------------------------------------- # --------------------------------------------------------------------
# Identify/read GIF files # Identify/read GIF files

View File

@ -30,10 +30,6 @@ from math import ceil, log
from . import BmpImagePlugin, Image, ImageFile, PngImagePlugin from . import BmpImagePlugin, Image, ImageFile, PngImagePlugin
from ._binary import i8, i16le as i16, i32le as i32 from ._binary import i8, i16le as i16, i32le as i32
# __version__ is deprecated and will be removed in a future version. Use
# PIL.__version__ instead.
__version__ = "0.1"
# #
# -------------------------------------------------------------------- # --------------------------------------------------------------------

View File

@ -31,11 +31,6 @@ import re
from . import Image, ImageFile, ImagePalette from . import Image, ImageFile, ImagePalette
from ._binary import i8 from ._binary import i8
# __version__ is deprecated and will be removed in a future version. Use
# PIL.__version__ instead.
__version__ = "0.7"
# -------------------------------------------------------------------- # --------------------------------------------------------------------
# Standard tags # Standard tags

View File

@ -19,11 +19,6 @@ import re
from . import Image, ImageFile from . import Image, ImageFile
# __version__ is deprecated and will be removed in a future version. Use
# PIL.__version__ instead.
__version__ = "0.2"
# #
# -------------------------------------------------------------------- # --------------------------------------------------------------------

View File

@ -23,10 +23,6 @@ import tempfile
from . import Image, ImageFile from . import Image, ImageFile
from ._binary import i8, i16be as i16, i32be as i32, o8 from ._binary import i8, i16be as i16, i32be as i32, o8
# __version__ is deprecated and will be removed in a future version. Use
# PIL.__version__ instead.
__version__ = "0.3"
COMPRESSION = {1: "raw", 5: "jpeg"} COMPRESSION = {1: "raw", 5: "jpeg"}
PAD = o8(0) * 4 PAD = o8(0) * 4

View File

@ -18,10 +18,6 @@ import struct
from . import Image, ImageFile from . import Image, ImageFile
# __version__ is deprecated and will be removed in a future version. Use
# PIL.__version__ instead.
__version__ = "0.1"
def _parse_codestream(fp): def _parse_codestream(fp):
"""Parse the JPEG 2000 codestream to extract the size and component """Parse the JPEG 2000 codestream to extract the size and component

View File

@ -47,11 +47,6 @@ from ._binary import i8, i16be as i16, i32be as i32, o8
from ._util import isStringType from ._util import isStringType
from .JpegPresets import presets from .JpegPresets import presets
# __version__ is deprecated and will be removed in a future version. Use
# PIL.__version__ instead.
__version__ = "0.6"
# #
# Parser # Parser

View File

@ -20,10 +20,6 @@ import struct
from . import Image, ImageFile from . import Image, ImageFile
# __version__ is deprecated and will be removed in a future version. Use
# PIL.__version__ instead.
__version__ = "0.2"
def _accept(s): def _accept(s):
return s[:8] == b"\x00\x00\x00\x00\x00\x00\x00\x04" return s[:8] == b"\x00\x00\x00\x00\x00\x00\x00\x04"

View File

@ -21,11 +21,6 @@ import olefile
from . import Image, TiffImagePlugin from . import Image, TiffImagePlugin
# __version__ is deprecated and will be removed in a future version. Use
# PIL.__version__ instead.
__version__ = "0.1"
# #
# -------------------------------------------------------------------- # --------------------------------------------------------------------

View File

@ -17,11 +17,6 @@
from . import Image, ImageFile from . import Image, ImageFile
from ._binary import i8 from ._binary import i8
# __version__ is deprecated and will be removed in a future version. Use
# PIL.__version__ instead.
__version__ = "0.1"
# #
# Bitstream parser # Bitstream parser

View File

@ -21,10 +21,6 @@
from . import Image, ImageFile, JpegImagePlugin from . import Image, ImageFile, JpegImagePlugin
from ._binary import i16be as i16 from ._binary import i16be as i16
# __version__ is deprecated and will be removed in a future version. Use
# PIL.__version__ instead.
__version__ = "0.1"
def _accept(prefix): def _accept(prefix):
return JpegImagePlugin._accept(prefix) return JpegImagePlugin._accept(prefix)

View File

@ -29,11 +29,6 @@ import struct
from . import Image, ImageFile from . import Image, ImageFile
from ._binary import i8, i16le as i16, o16le as o16 from ._binary import i8, i16le as i16, o16le as o16
# __version__ is deprecated and will be removed in a future version. Use
# PIL.__version__ instead.
__version__ = "0.1"
# #
# read MSP files # read MSP files

View File

@ -10,10 +10,6 @@
from . import Image, ImageFile from . import Image, ImageFile
from ._binary import o8, o16be as o16b from ._binary import o8, o16be as o16b
# __version__ is deprecated and will be removed in a future version. Use
# PIL.__version__ instead.
__version__ = "1.0"
# fmt: off # fmt: off
_Palm8BitColormapValues = ( # noqa: E131 _Palm8BitColormapValues = ( # noqa: E131
(255, 255, 255), (255, 204, 255), (255, 153, 255), (255, 102, 255), (255, 255, 255), (255, 204, 255), (255, 153, 255), (255, 102, 255),

View File

@ -18,11 +18,6 @@
from . import Image, ImageFile from . import Image, ImageFile
from ._binary import i8 from ._binary import i8
# __version__ is deprecated and will be removed in a future version. Use
# PIL.__version__ instead.
__version__ = "0.1"
## ##
# Image plugin for PhotoCD images. This plugin only reads the 768x512 # Image plugin for PhotoCD images. This plugin only reads the 768x512
# image from the file; higher resolutions are encoded in a proprietary # image from the file; higher resolutions are encoded in a proprietary

View File

@ -33,10 +33,6 @@ from ._binary import i8, i16le as i16, o8, o16le as o16
logger = logging.getLogger(__name__) logger = logging.getLogger(__name__)
# __version__ is deprecated and will be removed in a future version. Use
# PIL.__version__ instead.
__version__ = "0.6"
def _accept(prefix): def _accept(prefix):
return i8(prefix[0]) == 10 and i8(prefix[1]) in [0, 2, 3, 5] return i8(prefix[0]) == 10 and i8(prefix[1]) in [0, 2, 3, 5]

View File

@ -24,12 +24,7 @@ import io
import os import os
import time import time
from . import Image, ImageFile, ImageSequence, PdfParser from . import Image, ImageFile, ImageSequence, PdfParser, __version__
# __version__ is deprecated and will be removed in a future version. Use
# PIL.__version__ instead.
__version__ = "0.5"
# #
# -------------------------------------------------------------------- # --------------------------------------------------------------------
@ -82,7 +77,7 @@ def _save(im, fp, filename, save_all=False):
existing_pdf.start_writing() existing_pdf.start_writing()
existing_pdf.write_header() existing_pdf.write_header()
existing_pdf.write_comment("created by PIL PDF driver " + __version__) existing_pdf.write_comment("created by Pillow PDF driver " + __version__)
# #
# pages # pages

View File

@ -22,11 +22,6 @@
from . import Image, ImageFile from . import Image, ImageFile
from ._binary import i16le as i16 from ._binary import i16le as i16
# __version__ is deprecated and will be removed in a future version. Use
# PIL.__version__ instead.
__version__ = "0.1"
# #
# helpers # helpers

View File

@ -40,10 +40,6 @@ from . import Image, ImageFile, ImagePalette
from ._binary import i8, i16be as i16, i32be as i32, o16be as o16, o32be as o32 from ._binary import i8, i16be as i16, i32be as i32, o16be as o16, o32be as o32
from ._util import py3 from ._util import py3
# __version__ is deprecated and will be removed in a future version. Use
# PIL.__version__ instead.
__version__ = "0.9"
logger = logging.getLogger(__name__) logger = logging.getLogger(__name__)
is_cid = re.compile(br"\w\w\w\w").match is_cid = re.compile(br"\w\w\w\w").match

View File

@ -17,10 +17,6 @@
from . import Image, ImageFile from . import Image, ImageFile
# __version__ is deprecated and will be removed in a future version. Use
# PIL.__version__ instead.
__version__ = "0.2"
# #
# -------------------------------------------------------------------- # --------------------------------------------------------------------

View File

@ -16,10 +16,6 @@
# See the README file for information on usage and redistribution. # See the README file for information on usage and redistribution.
# #
# __version__ is deprecated and will be removed in a future version. Use
# PIL.__version__ instead.
__version__ = "0.4"
import io import io
from . import Image, ImageFile, ImagePalette from . import Image, ImageFile, ImagePalette

View File

@ -29,10 +29,6 @@ from . import Image, ImageFile
from ._binary import i8, i16be as i16, o8 from ._binary import i8, i16be as i16, o8
from ._util import py3 from ._util import py3
# __version__ is deprecated and will be removed in a future version. Use
# PIL.__version__ instead.
__version__ = "0.3"
def _accept(prefix): def _accept(prefix):
return len(prefix) >= 2 and i16(prefix) == 474 return len(prefix) >= 2 and i16(prefix) == 474

View File

@ -20,10 +20,6 @@
from . import Image, ImageFile, ImagePalette from . import Image, ImageFile, ImagePalette
from ._binary import i32be as i32 from ._binary import i32be as i32
# __version__ is deprecated and will be removed in a future version. Use
# PIL.__version__ instead.
__version__ = "0.3"
def _accept(prefix): def _accept(prefix):
return len(prefix) >= 4 and i32(prefix) == 0x59A66A95 return len(prefix) >= 4 and i32(prefix) == 0x59A66A95

View File

@ -22,11 +22,6 @@ import warnings
from . import Image, ImageFile, ImagePalette from . import Image, ImageFile, ImagePalette
from ._binary import i8, i16le as i16, o8, o16le as o16 from ._binary import i8, i16le as i16, o8, o16le as o16
# __version__ is deprecated and will be removed in a future version. Use
# PIL.__version__ instead.
__version__ = "0.3"
# #
# -------------------------------------------------------------------- # --------------------------------------------------------------------
# Read RGA file # Read RGA file

View File

@ -64,9 +64,6 @@ except ImportError:
from collections import MutableMapping from collections import MutableMapping
# __version__ is deprecated and will be removed in a future version. Use
# PIL.__version__ instead.
__version__ = "1.3.5"
DEBUG = False # Needs to be merged with the new logging approach. DEBUG = False # Needs to be merged with the new logging approach.
# Set these to true to force use of libtiff for reading or writing. # Set these to true to force use of libtiff for reading or writing.

View File

@ -25,10 +25,6 @@ from . import Image, ImageFile
from ._binary import i16le as word, i32le as dword, si16le as short, si32le as _long from ._binary import i16le as word, i32le as dword, si16le as short, si32le as _long
from ._util import py3 from ._util import py3
# __version__ is deprecated and will be removed in a future version. Use
# PIL.__version__ instead.
__version__ = "0.2"
_handler = None _handler = None
if py3: if py3:

View File

@ -20,10 +20,6 @@
from . import Image, ImageFile, ImagePalette from . import Image, ImageFile, ImagePalette
from ._binary import i8, o8 from ._binary import i8, o8
# __version__ is deprecated and will be removed in a future version. Use
# PIL.__version__ instead.
__version__ = "0.1"
_MAGIC = b"P7 332" _MAGIC = b"P7 332"
# standard color palette for thumbnails (RGB332) # standard color palette for thumbnails (RGB332)

View File

@ -23,10 +23,6 @@ import re
from . import Image, ImageFile from . import Image, ImageFile
# __version__ is deprecated and will be removed in a future version. Use
# PIL.__version__ instead.
__version__ = "0.6"
# XBM header # XBM header
xbm_head = re.compile( xbm_head = re.compile(
br"\s*#define[ \t]+.*_width[ \t]+(?P<width>[0-9]+)[\r\n]+" br"\s*#define[ \t]+.*_width[ \t]+(?P<width>[0-9]+)[\r\n]+"

View File

@ -20,10 +20,6 @@ import re
from . import Image, ImageFile, ImagePalette from . import Image, ImageFile, ImagePalette
from ._binary import i8, o8 from ._binary import i8, o8
# __version__ is deprecated and will be removed in a future version. Use
# PIL.__version__ instead.
__version__ = "0.2"
# XPM header # XPM header
xpm_head = re.compile(b'"([0-9]*) ([0-9]*) ([0-9]*) ([0-9]*)') xpm_head = re.compile(b'"([0-9]*) ([0-9]*) ([0-9]*) ([0-9]*)')