Document when deprecations will be removed [CI skip]

This commit is contained in:
Hugo van Kemenade 2020-12-10 14:32:43 +02:00
parent 839d54a19b
commit 0893f502c3
4 changed files with 14 additions and 14 deletions

View File

@ -17,7 +17,7 @@ Image.show command parameter
.. deprecated:: 7.2.0 .. 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. Use a subclass of :py:class:`.ImageShow.Viewer` instead.
Image._showxv Image._showxv
@ -25,26 +25,26 @@ Image._showxv
.. deprecated:: 7.2.0 .. deprecated:: 7.2.0
``Image._showxv`` has been deprecated. Use :py:meth:`.Image.Image.show` ``Image._showxv`` will be removed in Pillow 9.0.0 (2022-01-02).
instead. If custom behaviour is required, use :py:func:`.ImageShow.register` to add Use :py:meth:`.Image.Image.show` instead. If custom behaviour is required, use
a custom :py:class:`.ImageShow.Viewer` class. :py:func:`.ImageShow.register` to add a custom :py:class:`.ImageShow.Viewer` class.
ImageFile.raise_ioerror ImageFile.raise_ioerror
~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~
.. deprecated:: 7.2.0 .. deprecated:: 7.2.0
``IOError`` was merged into ``OSError`` in Python 3.3. So, ``ImageFile.raise_ioerror`` ``IOError`` was merged into ``OSError`` in Python 3.3.
is now deprecated and will be removed in a future release. Use So, ``ImageFile.raise_ioerror`` will be removed in Pillow 9.0.0 (2022-01-02).
``ImageFile.raise_oserror`` instead. Use ``ImageFile.raise_oserror`` instead.
PILLOW_VERSION constant PILLOW_VERSION constant
~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~
.. deprecated:: 5.2.0 .. deprecated:: 5.2.0
``PILLOW_VERSION`` has been deprecated and will be removed in a future release. Use ``PILLOW_VERSION`` will be removed in Pillow 9.0.0 (2022-01-02).
``__version__`` instead. Use ``__version__`` instead.
It was initially removed in Pillow 7.0.0, but brought back in 7.1.0 to give projects It was initially removed in Pillow 7.0.0, but brought back in 7.1.0 to give projects
more time to upgrade. more time to upgrade.

View File

@ -2197,8 +2197,8 @@ class Image:
if command is not None: if command is not None:
warnings.warn( warnings.warn(
"The command parameter is deprecated and will be removed in a future " "The command parameter is deprecated and will be removed in Pillow 9 "
"release. Use a subclass of ImageShow.Viewer instead.", "(2022-01-02). Use a subclass of ImageShow.Viewer instead.",
DeprecationWarning, DeprecationWarning,
) )
@ -3176,7 +3176,7 @@ def _showxv(image, title=None, **options):
del options["_internal_pillow"] del options["_internal_pillow"]
else: else:
warnings.warn( 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.", "Use Image.show instead.",
DeprecationWarning, DeprecationWarning,
) )

View File

@ -69,7 +69,7 @@ def raise_oserror(error):
def raise_ioerror(error): def raise_ioerror(error):
warnings.warn( 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.", "Use raise_oserror instead.",
DeprecationWarning, DeprecationWarning,
) )

View File

@ -26,7 +26,7 @@ __version__ = _version.__version__
# Use __version__ instead. # Use __version__ instead.
def _raise_version_warning(): def _raise_version_warning():
warnings.warn( 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.", "Use __version__ instead.",
DeprecationWarning, DeprecationWarning,
stacklevel=3, stacklevel=3,