From 24c1a32ed38d12a9bba3e4efa2fad5ee185ccad3 Mon Sep 17 00:00:00 2001 From: Hugo van Kemenade Date: Sun, 9 Aug 2020 20:08:38 +0300 Subject: [PATCH] Add release notes for 8.0.0 and a template --- docs/conf.py | 2 +- docs/deprecations.rst | 34 ++++++++-------- docs/reference/ImageChops.rst | 7 +--- docs/releasenotes/8.0.0.rst | 73 ++++++++++++++++++++++++++++++++++ docs/releasenotes/index.rst | 1 + docs/releasenotes/template.rst | 45 +++++++++++++++++++++ 6 files changed, 138 insertions(+), 24 deletions(-) create mode 100644 docs/releasenotes/8.0.0.rst create mode 100644 docs/releasenotes/template.rst diff --git a/docs/conf.py b/docs/conf.py index 78841cc15..a022e61cb 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -77,7 +77,7 @@ language = None # List of patterns, relative to source directory, that match files and # directories to ignore when looking for source files. -exclude_patterns = ["_build"] +exclude_patterns = ["_build", "releasenotes/template.rst"] # The reST default role (used for this markup: `text`) to use for all # documents. diff --git a/docs/deprecations.rst b/docs/deprecations.rst index 10ccec632..a619f133c 100644 --- a/docs/deprecations.rst +++ b/docs/deprecations.rst @@ -18,16 +18,16 @@ Image.show command parameter .. deprecated:: 7.2.0 The ``command`` parameter was deprecated and will be removed in a future release. -Use a subclass of ``ImageShow.Viewer`` instead. +Use a subclass of :py:class:`.ImageShow.Viewer` instead. Image._showxv ~~~~~~~~~~~~~ .. deprecated:: 7.2.0 -``Image._showxv`` has been deprecated. Use :py:meth:`~PIL.Image.Image.show` -instead. If custom behaviour is required, use :py:meth:`~PIL.ImageShow.register` to add -a custom :py:class:`~PIL.ImageShow.Viewer` class. +``Image._showxv`` has been deprecated. Use :py:meth:`.Image.Image.show` +instead. If custom behaviour is required, use :py:func:`.ImageShow.register` to add +a custom :py:class:`.ImageShow.Viewer` class. ImageFile.raise_ioerror ~~~~~~~~~~~~~~~~~~~~~~~ @@ -61,7 +61,7 @@ im.offset .. deprecated:: 1.1.2 .. versionremoved:: 8.0.0 -``im.offset()`` has been removed, call ``ImageChops.offset()`` instead. +``im.offset()`` has been removed, call :py:func:`.ImageChops.offset()` instead. It was documented as deprecated in PIL 1.1.2, raised a ``DeprecationWarning`` since 1.1.5, @@ -88,20 +88,20 @@ ImageCms.CmsProfile attributes .. deprecated:: 3.2.0 .. versionremoved:: 8.0.0 -Some attributes in ``ImageCms.CmsProfile`` have been removed. From 6.0.0, they issued a -``DeprecationWarning``: +Some attributes in :py:class:`PIL.ImageCms.CmsProfile` have been removed. From 6.0.0, +they issued a ``DeprecationWarning``: -======================== =============================== +======================== =============================================================== Removed Use instead -======================== =============================== -``color_space`` Padded ``xcolor_space`` -``pcs`` Padded ``connection_space`` -``product_copyright`` Unicode ``copyright`` -``product_desc`` Unicode ``profile_description`` -``product_description`` Unicode ``profile_description`` -``product_manufacturer`` Unicode ``manufacturer`` -``product_model`` Unicode ``model`` -======================== =============================== +======================== =============================================================== +``color_space`` Padded :py:attr:`~PIL.ImageCms.CmsProfile.xcolor_space` +``pcs`` Padded :py:attr:`~PIL.ImageCms.CmsProfile.connection_space` +``product_copyright`` Unicode :py:attr:`~PIL.ImageCms.CmsProfile.copyright` +``product_desc`` Unicode :py:attr:`~PIL.ImageCms.CmsProfile.profile_description` +``product_description`` Unicode :py:attr:`~PIL.ImageCms.CmsProfile.profile_description` +``product_manufacturer`` Unicode :py:attr:`~PIL.ImageCms.CmsProfile.manufacturer` +``product_model`` Unicode :py:attr:`~PIL.ImageCms.CmsProfile.model` +======================== =============================================================== Python 2.7 ~~~~~~~~~~ diff --git a/docs/reference/ImageChops.rst b/docs/reference/ImageChops.rst index 772d9c983..9519361a7 100644 --- a/docs/reference/ImageChops.rst +++ b/docs/reference/ImageChops.rst @@ -39,12 +39,7 @@ operations in this module). .. autofunction:: PIL.ImageChops.soft_light .. autofunction:: PIL.ImageChops.hard_light .. autofunction:: PIL.ImageChops.overlay -.. py:method:: PIL.ImageChops.offset(image, xoffset, yoffset=None) - - Returns a copy of the image where data has been offset by the given - distances. Data wraps around the edges. If **yoffset** is omitted, it - is assumed to be equal to **xoffset**. - +.. autofunction:: PIL.ImageChops.offset .. autofunction:: PIL.ImageChops.screen .. autofunction:: PIL.ImageChops.subtract .. autofunction:: PIL.ImageChops.subtract_modulo diff --git a/docs/releasenotes/8.0.0.rst b/docs/releasenotes/8.0.0.rst new file mode 100644 index 000000000..14b4bab84 --- /dev/null +++ b/docs/releasenotes/8.0.0.rst @@ -0,0 +1,73 @@ +8.0.0 +----- + +Backwards Incompatible Changes +============================== + +Python 3.5 +^^^^^^^^^^ + +Pillow has dropped support for Python 3.5, which reached end-of-life on 2020-09-13. + +im.offset +^^^^^^^^^ + +``im.offset()`` has been removed, call :py:func:`.ImageChops.offset()` instead. + +Image.fromstring, im.fromstring and im.tostring +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +* ``Image.fromstring()`` has been removed, call :py:func:`.Image.frombytes()` instead. +* ``im.fromstring()`` has been removed, call :py:meth:`~PIL.Image.Image.frombytes()` instead. +* ``im.tostring()`` has been removed, call :py:meth:`~PIL.Image.Image.tobytes()` instead. + +ImageCms.CmsProfile attributes +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +Some attributes in :py:class:`PIL.ImageCms.CmsProfile` have been removed: + +======================== =============================================================== +Removed Use instead +======================== =============================================================== +``color_space`` Padded :py:attr:`~PIL.ImageCms.CmsProfile.xcolor_space` +``pcs`` Padded :py:attr:`~PIL.ImageCms.CmsProfile.connection_space` +``product_copyright`` Unicode :py:attr:`~PIL.ImageCms.CmsProfile.copyright` +``product_desc`` Unicode :py:attr:`~PIL.ImageCms.CmsProfile.profile_description` +``product_description`` Unicode :py:attr:`~PIL.ImageCms.CmsProfile.profile_description` +``product_manufacturer`` Unicode :py:attr:`~PIL.ImageCms.CmsProfile.manufacturer` +``product_model`` Unicode :py:attr:`~PIL.ImageCms.CmsProfile.model` +======================== =============================================================== + +API Changes +=========== + +Add MIME type to PsdImagePlugin +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +"image/vnd.adobe.photoshop" is now registered as the +:py:class:`.PsdImagePlugin.PsdImageFile` MIME type. + +API Additions +============= + +ImageOps.autocontrast cutoffs +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +Previously, the ``cutoff`` parameter of :py:func:`.ImageOps.autocontrast` could only +be a single integer, used as the percent to cut off from the histogram on the low and +high ends. + +Now, it can also be a tuple ``(low, high)``. + +Security +======== + +TODO + +Other Changes +============= + +TODO +^^^^ + +TODO diff --git a/docs/releasenotes/index.rst b/docs/releasenotes/index.rst index 2d7747c3e..ba81fbaf8 100644 --- a/docs/releasenotes/index.rst +++ b/docs/releasenotes/index.rst @@ -13,6 +13,7 @@ expected to be backported to earlier versions. .. toctree:: :maxdepth: 2 + 8.0.0 7.2.0 7.1.2 7.1.1 diff --git a/docs/releasenotes/template.rst b/docs/releasenotes/template.rst new file mode 100644 index 000000000..bf381114e --- /dev/null +++ b/docs/releasenotes/template.rst @@ -0,0 +1,45 @@ +x.y.z +----- + +Backwards Incompatible Changes +============================== + +TODO +^^^^ + +Deprecations +============ + +TODO +^^^^ + +TODO + +API Changes +=========== + +TODO +^^^^ + +TODO + +API Additions +============= + +TODO +^^^^ + +TODO + +Security +======== + +TODO + +Other Changes +============= + +TODO +^^^^ + +TODO