Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Document when file argument will be removed #5987

Merged
merged 1 commit into from
Jan 26, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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