Skip to content

Commit

Permalink
Merge pull request #4107 from hugovk/rm-deprecated-PILLOW_VERSION
Browse files Browse the repository at this point in the history
Remove deprecated PILLOW_VERSION
  • Loading branch information
radarhere committed Oct 3, 2019
2 parents 59153f5 + f898ccb commit f61af2f
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 15 deletions.
15 changes: 7 additions & 8 deletions docs/deprecations.rst
Original file line number Diff line number Diff line change
Expand Up @@ -94,14 +94,6 @@ a ``DeprecationWarning``:
Setting the size of a TIFF image directly is deprecated, and will
be removed in a future version. Use the resize method instead.
PILLOW_VERSION constant
~~~~~~~~~~~~~~~~~~~~~~~

.. deprecated:: 5.2.0

``PILLOW_VERSION`` has been deprecated and will be removed in 7.0.0. Use ``__version__``
instead.

ImageCms.CmsProfile attributes
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Expand All @@ -128,6 +120,13 @@ Removed features
Deprecated features are only removed in major releases after an appropriate
period of deprecation has passed.

PILLOW_VERSION constant
~~~~~~~~~~~~~~~~~~~~~~~

*Removed in version 7.0.0.*

``PILLOW_VERSION`` has been removed. Use ``__version__`` instead.

VERSION constant
~~~~~~~~~~~~~~~~

Expand Down
7 changes: 2 additions & 5 deletions src/PIL/Image.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,9 @@
import warnings

# VERSION was removed in Pillow 6.0.0.
# PILLOW_VERSION is deprecated and will be removed in Pillow 7.0.0.
# PILLOW_VERSION was removed in Pillow 7.0.0.
# Use __version__ instead.
from . import PILLOW_VERSION, ImageMode, TiffTags, __version__, _plugins
from . import ImageMode, TiffTags, __version__, _plugins
from ._binary import i8, i32le
from ._util import deferred_error, isPath, isStringType, py3

Expand All @@ -57,9 +57,6 @@
from collections import Callable, MutableMapping


# Silence warning
assert PILLOW_VERSION

logger = logging.getLogger(__name__)


Expand Down
4 changes: 2 additions & 2 deletions src/PIL/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@
from . import _version

# VERSION was removed in Pillow 6.0.0.
# PILLOW_VERSION is deprecated and will be removed in Pillow 7.0.0.
# PILLOW_VERSION was removed in Pillow 7.0.0.
# Use __version__ instead.
PILLOW_VERSION = __version__ = _version.__version__
__version__ = _version.__version__

del _version

Expand Down

0 comments on commit f61af2f

Please sign in to comment.