Skip to content

Commit

Permalink
Merge pull request #5085 from hugovk/document-removal-version
Browse files Browse the repository at this point in the history
Document when deprecations will be removed
  • Loading branch information
radarhere authored Dec 11, 2020
2 parents 839d54a + 0893f50 commit 7251477
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 14 deletions.
18 changes: 9 additions & 9 deletions docs/deprecations.rst
Original file line number Diff line number Diff line change
Expand Up @@ -17,34 +17,34 @@ Image.show command parameter

.. deprecated:: 7.2.0

The ``command`` parameter was deprecated and will be removed in a future release.
The ``command`` parameter will be removed in Pillow 9.0.0 (2022-01-02).
Use a subclass of :py:class:`.ImageShow.Viewer` instead.

Image._showxv
~~~~~~~~~~~~~

.. deprecated:: 7.2.0

``Image._showxv`` has been deprecated. Use :py:meth:`.Image.Image.show`
instead. If custom behaviour is required, use :py:func:`.ImageShow.register` to add
a custom :py:class:`.ImageShow.Viewer` class.
``Image._showxv`` will be removed in Pillow 9.0.0 (2022-01-02).
Use :py:meth:`.Image.Image.show` instead. If custom behaviour is required, use
:py:func:`.ImageShow.register` to add a custom :py:class:`.ImageShow.Viewer` class.

ImageFile.raise_ioerror
~~~~~~~~~~~~~~~~~~~~~~~

.. deprecated:: 7.2.0

``IOError`` was merged into ``OSError`` in Python 3.3. So, ``ImageFile.raise_ioerror``
is now deprecated and will be removed in a future release. Use
``ImageFile.raise_oserror`` instead.
``IOError`` was merged into ``OSError`` in Python 3.3.
So, ``ImageFile.raise_ioerror`` will be removed in Pillow 9.0.0 (2022-01-02).
Use ``ImageFile.raise_oserror`` instead.

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

.. deprecated:: 5.2.0

``PILLOW_VERSION`` has been deprecated and will be removed in a future release. Use
``__version__`` instead.
``PILLOW_VERSION`` will be removed in Pillow 9.0.0 (2022-01-02).
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.
Expand Down
6 changes: 3 additions & 3 deletions src/PIL/Image.py
Original file line number Diff line number Diff line change
Expand Up @@ -2197,8 +2197,8 @@ def show(self, title=None, command=None):

if command is not None:
warnings.warn(
"The command parameter is deprecated and will be removed in a future "
"release. Use a subclass of ImageShow.Viewer instead.",
"The command parameter is deprecated and will be removed in Pillow 9 "
"(2022-01-02). Use a subclass of ImageShow.Viewer instead.",
DeprecationWarning,
)

Expand Down Expand Up @@ -3176,7 +3176,7 @@ def _showxv(image, title=None, **options):
del options["_internal_pillow"]
else:
warnings.warn(
"_showxv is deprecated and will be removed in a future release. "
"_showxv is deprecated and will be removed in Pillow 9 (2022-01-02). "
"Use Image.show instead.",
DeprecationWarning,
)
Expand Down
2 changes: 1 addition & 1 deletion src/PIL/ImageFile.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ def raise_oserror(error):

def raise_ioerror(error):
warnings.warn(
"raise_ioerror is deprecated and will be removed in a future release. "
"raise_ioerror is deprecated and will be removed in Pillow 9 (2022-01-02). "
"Use raise_oserror instead.",
DeprecationWarning,
)
Expand Down
2 changes: 1 addition & 1 deletion src/PIL/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
# Use __version__ instead.
def _raise_version_warning():
warnings.warn(
"PILLOW_VERSION is deprecated and will be removed in a future release. "
"PILLOW_VERSION is deprecated and will be removed in Pillow 9 (2022-01-02). "
"Use __version__ instead.",
DeprecationWarning,
stacklevel=3,
Expand Down

0 comments on commit 7251477

Please sign in to comment.