mirror of
https://github.com/python-pillow/Pillow.git
synced 2024-12-27 10:26:19 +03:00
Re-add deprecated PILLOW_VERSION to give projects more time to upgrade
This commit is contained in:
parent
75a9ef1533
commit
afa758eb33
|
@ -12,6 +12,17 @@ Deprecated features
|
||||||
Below are features which are considered deprecated. Where appropriate,
|
Below are features which are considered deprecated. Where appropriate,
|
||||||
a ``DeprecationWarning`` is issued.
|
a ``DeprecationWarning`` is issued.
|
||||||
|
|
||||||
|
PILLOW_VERSION constant
|
||||||
|
~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
|
||||||
|
.. deprecated:: 5.2.0
|
||||||
|
|
||||||
|
``PILLOW_VERSION`` has been deprecated and will be removed in a future release. Use
|
||||||
|
``__version__`` instead.
|
||||||
|
|
||||||
|
It was initially removed in Pillow 7.0.0, but brought back in 7.1.0 to give projects
|
||||||
|
more time to upgrade.
|
||||||
|
|
||||||
ImageCms.CmsProfile attributes
|
ImageCms.CmsProfile attributes
|
||||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
|
||||||
|
@ -69,13 +80,6 @@ Use instead:
|
||||||
with Image.open("hopper.png") as im:
|
with Image.open("hopper.png") as im:
|
||||||
im.save("out.jpg")
|
im.save("out.jpg")
|
||||||
|
|
||||||
PILLOW_VERSION constant
|
|
||||||
~~~~~~~~~~~~~~~~~~~~~~~
|
|
||||||
|
|
||||||
*Removed in version 7.0.0.*
|
|
||||||
|
|
||||||
``PILLOW_VERSION`` has been removed. Use ``__version__`` instead.
|
|
||||||
|
|
||||||
PIL.*ImagePlugin.__version__ attributes
|
PIL.*ImagePlugin.__version__ attributes
|
||||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
|
||||||
|
|
|
@ -27,6 +27,15 @@ Reading JPEG comments
|
||||||
When opening a JPEG image, the comment may now be read into
|
When opening a JPEG image, the comment may now be read into
|
||||||
:py:attr:`~PIL.Image.Image.info`.
|
:py:attr:`~PIL.Image.Image.info`.
|
||||||
|
|
||||||
|
PILLOW_VERSION constant
|
||||||
|
^^^^^^^^^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
|
``PILLOW_VERSION`` has been re-added but is deprecated and will be removed in a future
|
||||||
|
release. Use ``__version__`` instead.
|
||||||
|
|
||||||
|
It was initially removed in Pillow 7.0.0, but brought back in 7.1.0 to give projects
|
||||||
|
more time to upgrade.
|
||||||
|
|
||||||
Other Changes
|
Other Changes
|
||||||
=============
|
=============
|
||||||
|
|
||||||
|
|
|
@ -39,12 +39,22 @@ from collections.abc import Callable, MutableMapping
|
||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
|
|
||||||
# VERSION was removed in Pillow 6.0.0.
|
# VERSION was removed in Pillow 6.0.0.
|
||||||
# PILLOW_VERSION was removed in Pillow 7.0.0.
|
# PILLOW_VERSION is deprecated and will be removed in a future release.
|
||||||
# Use __version__ instead.
|
# Use __version__ instead.
|
||||||
from . import ImageMode, TiffTags, UnidentifiedImageError, __version__, _plugins
|
from . import (
|
||||||
|
PILLOW_VERSION,
|
||||||
|
ImageMode,
|
||||||
|
TiffTags,
|
||||||
|
UnidentifiedImageError,
|
||||||
|
__version__,
|
||||||
|
_plugins,
|
||||||
|
)
|
||||||
from ._binary import i8, i32le
|
from ._binary import i8, i32le
|
||||||
from ._util import deferred_error, isPath
|
from ._util import deferred_error, isPath
|
||||||
|
|
||||||
|
# Silence warning
|
||||||
|
assert PILLOW_VERSION
|
||||||
|
|
||||||
logger = logging.getLogger(__name__)
|
logger = logging.getLogger(__name__)
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -16,9 +16,9 @@ Use PIL.__version__ for this Pillow version.
|
||||||
from . import _version
|
from . import _version
|
||||||
|
|
||||||
# VERSION was removed in Pillow 6.0.0.
|
# VERSION was removed in Pillow 6.0.0.
|
||||||
# PILLOW_VERSION was removed in Pillow 7.0.0.
|
# PILLOW_VERSION is deprecated and will be removed in a future release.
|
||||||
# Use __version__ instead.
|
# Use __version__ instead.
|
||||||
__version__ = _version.__version__
|
PILLOW_VERSION = __version__ = _version.__version__
|
||||||
|
|
||||||
del _version
|
del _version
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user