Added release notes for #5959

This commit is contained in:
Andrew Murray 2022-02-10 13:56:27 +11:00
parent 912296200c
commit 8b6ee688d8

View File

@ -5,24 +5,37 @@ API Changes
=========== ===========
Raise an error when performing a negative crop Raise an error when performing a negative crop
---------------------------------------------- ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Performing a negative crop on an image previously just returned a `(0, 0)` image. Now Performing a negative crop on an image previously just returned a ``(0, 0)`` image. Now
it will raise a `ValueError`, to help reduce confusion if a user has unintentionally it will raise a ``ValueError``, to help reduce confusion if a user has unintentionally
provided the wrong arguments. provided the wrong arguments.
Added specific error if path coordinate type is incorrect Added specific error if path coordinate type is incorrect
--------------------------------------------------------- ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Rather than returning a `SystemError`, passing the incorrect types of coordinates into Rather than returning a ``SystemError``, passing the incorrect types of coordinates into
a path will now raise a more specific `ValueError`, with the message "incorrect a path will now raise a more specific ``ValueError``, with the message "incorrect
coordinate type". coordinate type".
Deprecations
^^^^^^^^^^^^
ImageShow.Viewer.show_file file argument
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
The ``file`` argument in :py:meth:`~PIL.ImageShow.Viewer.show_file()` has been
deprecated, 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
``viewer.show_file(path="test.jpg")`` instead.
API Additions API Additions
============= =============
Added get_photoshop_blocks() to parse Photoshop TIFF tag Added get_photoshop_blocks() to parse Photoshop TIFF tag
-------------------------------------------------------- ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
:py:meth:`~PIL.TiffImagePlugin.TiffImageFile.get_photoshop_blocks` has been added, to :py:meth:`~PIL.TiffImagePlugin.TiffImageFile.get_photoshop_blocks` has been added, to
allow users to determine what Photoshop "Image Resource Blocks" are contained within an allow users to determine what Photoshop "Image Resource Blocks" are contained within an
@ -36,8 +49,8 @@ Other Changes
============= =============
Image._repr_pretty_ Image._repr_pretty_
------------------- ^^^^^^^^^^^^^^^^^^^
`im._repr_pretty_` has been added to provide a representation of an image without the ``im._repr_pretty_`` has been added to provide a representation of an image without the
identity of the object. This allows Jupyter to describe an image and have that identity of the object. This allows Jupyter to describe an image and have that
description stay the same on subsequent executions of the same code. description stay the same on subsequent executions of the same code.