Skip to content

Commit

Permalink
Merge pull request #5987 from radarhere/deprecations
Browse files Browse the repository at this point in the history
  • Loading branch information
hugovk authored Jan 26, 2022
2 parents 76115e3 + 1d91f6d commit 47e233a
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
3 changes: 2 additions & 1 deletion docs/deprecations.rst
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,8 @@ ImageShow.Viewer.show_file file argument
.. deprecated:: 9.1.0

The ``file`` argument in :py:meth:`~PIL.ImageShow.Viewer.show_file()` has been
deprecated, replaced by ``path``.
deprecated and will be removed in Pillow 10.0.0 (2023-07-01). It has been replaced by
``path``.

In effect, ``viewer.show_file("test.jpg")`` will continue to work unchanged.
``viewer.show_file(file="test.jpg")`` will raise a deprecation warning, and suggest
Expand Down
9 changes: 6 additions & 3 deletions src/PIL/ImageShow.py
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,8 @@ def show_file(self, path=None, **options):
Display given file.
Before Pillow 9.1.0, the first argument was ``file``. This is now deprecated,
and ``path`` should be used instead.
and will be removed in Pillow 10.0.0 (2023-07-01). ``path`` should be used
instead.
"""
if path is None:
if "file" in options:
Expand Down Expand Up @@ -166,7 +167,8 @@ def show_file(self, path=None, **options):
Display given file.
Before Pillow 9.1.0, the first argument was ``file``. This is now deprecated,
and ``path`` should be used instead.
and will be removed in Pillow 10.0.0 (2023-07-01). ``path`` should be used
instead.
"""
if path is None:
if "file" in options:
Expand Down Expand Up @@ -208,7 +210,8 @@ def show_file(self, path=None, **options):
Display given file.
Before Pillow 9.1.0, the first argument was ``file``. This is now deprecated,
and ``path`` should be used instead.
and will be removed in Pillow 10.0.0 (2023-07-01). ``path`` should be used
instead.
"""
if path is None:
if "file" in options:
Expand Down

0 comments on commit 47e233a

Please sign in to comment.