diff --git a/docs/deprecations.rst b/docs/deprecations.rst index dbe65dda1..a3abe81fa 100644 --- a/docs/deprecations.rst +++ b/docs/deprecations.rst @@ -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 diff --git a/src/PIL/ImageShow.py b/src/PIL/ImageShow.py index e437bbade..2165da307 100644 --- a/src/PIL/ImageShow.py +++ b/src/PIL/ImageShow.py @@ -111,7 +111,8 @@ class Viewer: 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: @@ -166,7 +167,8 @@ class MacViewer(Viewer): 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: @@ -208,7 +210,8 @@ class UnixViewer(Viewer): 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: