Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Remove deprecated VERSION #3624

Merged
merged 5 commits into from
Mar 2, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions Tests/test_000_sanity.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,6 @@ def test_sanity(self):
# Make sure we have the binary extension
PIL.Image.core.new("L", (100, 100))

self.assertEqual(PIL.Image.VERSION[:3], '1.1')

# Create an image and do stuff with it.
im = PIL.Image.new("1", (100, 100))
self.assertEqual((im.mode, im.size), ('1', (100, 100)))
Expand Down
2 changes: 1 addition & 1 deletion Tests/test_file_libtiff.py
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,7 @@ def test_additional_metadata(self):
# 4: "long",
# 5: "rational",
# 12: "double",
# type: dummy value
# Type: dummy value
values = {2: 'test',
3: 1,
4: 2**20,
Expand Down
9 changes: 4 additions & 5 deletions src/PIL/Image.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,10 @@
# See the README file for information on usage and redistribution.
#

# VERSION is deprecated and will be removed in Pillow 6.0.0.
# PILLOW_VERSION is deprecated and will be removed after that.
# VERSION was removed in Pillow 6.0.0.
# PILLOW_VERSION is deprecated and will be removed in Pillow 7.0.0.
# Use __version__ instead.
from . import VERSION, PILLOW_VERSION, __version__, _plugins
from . import PILLOW_VERSION, __version__, _plugins
from ._util import py3

import logging
Expand Down Expand Up @@ -60,8 +60,7 @@
from collections import Callable


# Silence warnings
assert VERSION
# Silence warning
assert PILLOW_VERSION

logger = logging.getLogger(__name__)
Expand Down
2 changes: 1 addition & 1 deletion src/PIL/ImageCms.py
Original file line number Diff line number Diff line change
Expand Up @@ -950,5 +950,5 @@ def versions():

return (
VERSION, core.littlecms_version,
sys.version.split()[0], Image.VERSION
sys.version.split()[0], Image.__version__
)
2 changes: 0 additions & 2 deletions src/PIL/PdfParser.py
Original file line number Diff line number Diff line change
Expand Up @@ -393,8 +393,6 @@ class PdfParser:

def __init__(self, filename=None, f=None,
buf=None, start_offset=0, mode="rb"):
# type: (PdfParser, str, file, Union[bytes, bytearray], int, str)
# -> None
if buf and f:
raise RuntimeError(
"specify buf or f or filename, but not both buf and f")
Expand Down
5 changes: 2 additions & 3 deletions src/PIL/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,9 @@

from . import _version

# VERSION is deprecated and will be removed in Pillow 6.0.0.
# PILLOW_VERSION is deprecated and will be removed after that.
# VERSION was removed in Pillow 6.0.0.
# PILLOW_VERSION is deprecated and will be removed in Pillow 7.0.0.
# Use __version__ instead.
VERSION = '1.1.7' # PIL Version
PILLOW_VERSION = __version__ = _version.__version__

del _version
Expand Down
2 changes: 1 addition & 1 deletion winbuild/build_dep.py
Original file line number Diff line number Diff line change
Expand Up @@ -307,7 +307,7 @@ def add_compiler(compiler, bit):
add_compiler(compiler_from_env(), bit_from_env())
else:
# for compiler in all_compilers():
# add_compiler(compiler)
# add_compiler(compiler)
add_compiler(compilers[7.0][2008][32], 32)

with open('build_deps.cmd', 'w') as f:
Expand Down