From 8b6ee688d806e0ec7f3342582c41d8635ccf0a15 Mon Sep 17 00:00:00 2001 From: Andrew Murray Date: Thu, 10 Feb 2022 13:56:27 +1100 Subject: [PATCH] Added release notes for #5959 --- docs/releasenotes/9.1.0.rst | 31 ++++++++++++++++++++++--------- 1 file changed, 22 insertions(+), 9 deletions(-) diff --git a/docs/releasenotes/9.1.0.rst b/docs/releasenotes/9.1.0.rst index d0a8758bb..cbf9fe6e1 100644 --- a/docs/releasenotes/9.1.0.rst +++ b/docs/releasenotes/9.1.0.rst @@ -5,24 +5,37 @@ API Changes =========== Raise an error when performing a negative crop ----------------------------------------------- +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -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 +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 provided the wrong arguments. Added specific error if path coordinate type is incorrect ---------------------------------------------------------- +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -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 +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 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 ============= Added get_photoshop_blocks() to parse Photoshop TIFF tag --------------------------------------------------------- +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ :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 @@ -36,8 +49,8 @@ Other Changes ============= 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 description stay the same on subsequent executions of the same code.