mirror of
https://github.com/python-pillow/Pillow.git
synced 2025-05-03 07:23:41 +03:00
Remove PhotoImage.paste() box parameter, deprecated in 9.2.0
This commit is contained in:
parent
c9f11565f1
commit
584f8c39de
|
@ -89,13 +89,6 @@ def test_photoimage_blank(mode):
|
||||||
assert_image_equal(reloaded.convert(mode), im)
|
assert_image_equal(reloaded.convert(mode), im)
|
||||||
|
|
||||||
|
|
||||||
def test_box_deprecation():
|
|
||||||
im = hopper()
|
|
||||||
im_tk = ImageTk.PhotoImage(im)
|
|
||||||
with pytest.warns(DeprecationWarning):
|
|
||||||
im_tk.paste(im, (0, 0, 128, 128))
|
|
||||||
|
|
||||||
|
|
||||||
def test_bitmapimage():
|
def test_bitmapimage():
|
||||||
im = hopper("1")
|
im = hopper("1")
|
||||||
|
|
||||||
|
|
|
@ -12,13 +12,6 @@ Deprecated features
|
||||||
Below are features which are considered deprecated. Where appropriate,
|
Below are features which are considered deprecated. Where appropriate,
|
||||||
a ``DeprecationWarning`` is issued.
|
a ``DeprecationWarning`` is issued.
|
||||||
|
|
||||||
PhotoImage.paste box parameter
|
|
||||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
||||||
|
|
||||||
.. deprecated:: 9.2.0
|
|
||||||
|
|
||||||
The ``box`` parameter is unused. It will be removed in Pillow 10.0.0 (2023-07-01).
|
|
||||||
|
|
||||||
Image.coerce_e
|
Image.coerce_e
|
||||||
~~~~~~~~~~~~~~
|
~~~~~~~~~~~~~~
|
||||||
|
|
||||||
|
@ -208,6 +201,14 @@ FreeTypeFont.getmask2 fill parameter
|
||||||
The undocumented ``fill`` parameter of :py:meth:`.FreeTypeFont.getmask2` has been
|
The undocumented ``fill`` parameter of :py:meth:`.FreeTypeFont.getmask2` has been
|
||||||
removed.
|
removed.
|
||||||
|
|
||||||
|
PhotoImage.paste box parameter
|
||||||
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
|
||||||
|
.. deprecated:: 9.2.0
|
||||||
|
.. versionremoved:: 10.0.0
|
||||||
|
|
||||||
|
The ``box`` parameter was unused and has been removed.
|
||||||
|
|
||||||
PyQt5 and PySide2
|
PyQt5 and PySide2
|
||||||
~~~~~~~~~~~~~~~~~
|
~~~~~~~~~~~~~~~~~
|
||||||
|
|
||||||
|
|
|
@ -29,7 +29,6 @@ import tkinter
|
||||||
from io import BytesIO
|
from io import BytesIO
|
||||||
|
|
||||||
from . import Image
|
from . import Image
|
||||||
from ._deprecate import deprecate
|
|
||||||
|
|
||||||
# --------------------------------------------------------------------
|
# --------------------------------------------------------------------
|
||||||
# Check for Tkinter interface hooks
|
# Check for Tkinter interface hooks
|
||||||
|
@ -162,7 +161,7 @@ class PhotoImage:
|
||||||
"""
|
"""
|
||||||
return self.__size[1]
|
return self.__size[1]
|
||||||
|
|
||||||
def paste(self, im, box=None):
|
def paste(self, im):
|
||||||
"""
|
"""
|
||||||
Paste a PIL image into the photo image. Note that this can
|
Paste a PIL image into the photo image. Note that this can
|
||||||
be very slow if the photo image is displayed.
|
be very slow if the photo image is displayed.
|
||||||
|
@ -170,13 +169,7 @@ class PhotoImage:
|
||||||
:param im: A PIL image. The size must match the target region. If the
|
:param im: A PIL image. The size must match the target region. If the
|
||||||
mode does not match, the image is converted to the mode of
|
mode does not match, the image is converted to the mode of
|
||||||
the bitmap image.
|
the bitmap image.
|
||||||
:param box: Deprecated. This parameter will be removed in Pillow 10
|
|
||||||
(2023-07-01).
|
|
||||||
"""
|
"""
|
||||||
|
|
||||||
if box is not None:
|
|
||||||
deprecate("The box parameter", 10, None)
|
|
||||||
|
|
||||||
# convert to blittable
|
# convert to blittable
|
||||||
im.load()
|
im.load()
|
||||||
image = im.im
|
image = im.im
|
||||||
|
|
Loading…
Reference in New Issue
Block a user