File tree 4 files changed +17
-39
lines changed
4 files changed +17
-39
lines changed Original file line number Diff line number Diff line change @@ -626,22 +626,6 @@ def test_p_from_rgb_rgba(self):
626
626
expected = Image .new (mode , (100 , 100 ), color )
627
627
assert_image_equal (im .convert (mode ), expected )
628
628
629
- def test_showxv_deprecation (self ):
630
- class TestViewer (ImageShow .Viewer ):
631
- def show_image (self , image , ** options ):
632
- return True
633
-
634
- viewer = TestViewer ()
635
- ImageShow .register (viewer , - 1 )
636
-
637
- im = Image .new ("RGB" , (50 , 50 ), "white" )
638
-
639
- with pytest .warns (DeprecationWarning ):
640
- Image ._showxv (im )
641
-
642
- # Restore original state
643
- ImageShow ._viewers .pop (0 )
644
-
645
629
def test_no_resource_warning_on_save (self , tmp_path ):
646
630
# https://github.com/python-pillow/Pillow/issues/835
647
631
# Arrange
Original file line number Diff line number Diff line change @@ -33,15 +33,6 @@ Image.show command parameter
33
33
The ``command `` parameter will be removed in Pillow 9.0.0 (2022-01-02).
34
34
Use a subclass of :py:class: `.ImageShow.Viewer ` instead.
35
35
36
- Image._showxv
37
- ~~~~~~~~~~~~~
38
-
39
- .. deprecated :: 7.2.0
40
-
41
- ``Image._showxv `` will be removed in Pillow 9.0.0 (2022-01-02).
42
- Use :py:meth: `.Image.Image.show ` instead. If custom behaviour is required, use
43
- :py:func: `.ImageShow.register ` to add a custom :py:class: `.ImageShow.Viewer ` class.
44
-
45
36
Tk/Tcl 8.4
46
37
~~~~~~~~~~
47
38
@@ -89,6 +80,15 @@ Removed features
89
80
Deprecated features are only removed in major releases after an appropriate
90
81
period of deprecation has passed.
91
82
83
+ Image._showxv
84
+ ~~~~~~~~~~~~~
85
+
86
+ .. deprecated :: 7.2.0
87
+ .. versionremoved :: 9.0.0
88
+
89
+ Use :py:meth: `.Image.Image.show ` instead. If custom behaviour is required, use
90
+ :py:func: `.ImageShow.register ` to add a custom :py:class: `.ImageShow.Viewer ` class.
91
+
92
92
ImageFile.raise_ioerror
93
93
~~~~~~~~~~~~~~~~~~~~~~~
94
94
Original file line number Diff line number Diff line change @@ -14,3 +14,10 @@ ImageFile.raise_ioerror
14
14
15
15
``IOError `` was merged into ``OSError `` in Python 3.3. So, ``ImageFile.raise_ioerror ``
16
16
has been removed. Use ``ImageFile.raise_oserror `` instead.
17
+
18
+ Image._showxv
19
+ ~~~~~~~~~~~~~
20
+
21
+ ``Image._showxv `` has been removed. Use :py:meth: `~PIL.Image.Image.show `
22
+ instead. If custom behaviour is required, use :py:meth: `~PIL.ImageShow.register ` to add
23
+ a custom :py:class: `~PIL.ImageShow.Viewer ` class.
Original file line number Diff line number Diff line change @@ -3233,22 +3233,9 @@ def register_encoder(name, encoder):
3233
3233
3234
3234
3235
3235
def _show (image , ** options ):
3236
- options ["_internal_pillow" ] = True
3237
- _showxv (image , ** options )
3238
-
3239
-
3240
- def _showxv (image , title = None , ** options ):
3241
3236
from . import ImageShow
3242
3237
3243
- if "_internal_pillow" in options :
3244
- del options ["_internal_pillow" ]
3245
- else :
3246
- warnings .warn (
3247
- "_showxv is deprecated and will be removed in Pillow 9 (2022-01-02). "
3248
- "Use Image.show instead." ,
3249
- DeprecationWarning ,
3250
- )
3251
- ImageShow .show (image , title , ** options )
3238
+ ImageShow .show (image , ** options )
3252
3239
3253
3240
3254
3241
# --------------------------------------------------------------------
You can’t perform that action at this time.
0 commit comments