Merge pull request #4185 from hugovk/docs-7.0.0

Update docs for 7.0.0
This commit is contained in:
Andrew Murray 2019-11-02 21:18:30 +11:00 committed by GitHub
commit 678897a148
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 95 additions and 23 deletions

View File

@ -12,29 +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.
Image.__del__
~~~~~~~~~~~~~
.. deprecated:: 6.1.0
Implicitly closing the image's underlying file in ``Image.__del__`` has been deprecated.
Use a context manager or call ``Image.close()`` instead to close the file in a
deterministic way.
Deprecated:
.. code-block:: python
im = Image.open("hopper.png")
im.save("out.jpg")
Use instead:
.. code-block:: python
with Image.open("hopper.png") as im:
im.save("out.jpg")
Python 2.7 Python 2.7
~~~~~~~~~~ ~~~~~~~~~~
@ -96,6 +73,29 @@ Removed features
Deprecated features are only removed in major releases after an appropriate Deprecated features are only removed in major releases after an appropriate
period of deprecation has passed. period of deprecation has passed.
Image.__del__
~~~~~~~~~~~~~
*Removed in version 7.0.0.*
Implicitly closing the image's underlying file in ``Image.__del__`` has been removed.
Use a context manager or call ``Image.close()`` instead to close the file in a
deterministic way.
Previous method:
.. code-block:: python
im = Image.open("hopper.png")
im.save("out.jpg")
Use instead:
.. code-block:: python
with Image.open("hopper.png") as im:
im.save("out.jpg")
PILLOW_VERSION constant PILLOW_VERSION constant
~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~

View File

@ -0,0 +1,71 @@
7.0.0
-----
Backwards Incompatible Changes
==============================
PILLOW_VERSION constant
^^^^^^^^^^^^^^^^^^^^^^^
``PILLOW_VERSION`` has been removed. Use ``__version__`` instead.
PyQt4 and PySide
^^^^^^^^^^^^^^^^
Qt 4 reached end-of-life on 2015-12-19. Its Python bindings are also EOL: PyQt4 since
2018-08-31 and PySide since 2015-10-14.
Support for PyQt4 and PySide has been removed from ``ImageQt``. Please upgrade to PyQt5
or PySide2.
Setting the size of TIFF images
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Setting the size of a TIFF image directly (eg. ``im.size = (256, 256)``) throws
an error. Use ``Image.resize`` instead.
API Changes
===========
Deprecations
^^^^^^^^^^^^
TODO
~~~~
TODO
API Additions
=============
TODO
^^^^
TODO
Other Changes
=============
Image.__del__
^^^^^^^^^^^^^
Implicitly closing the image's underlying file in ``Image.__del__`` has been removed.
Use a context manager or call ``Image.close()`` instead to close the file in a
deterministic way.
Previous method:
.. code-block:: python
im = Image.open("hopper.png")
im.save("out.jpg")
Use instead:
.. code-block:: python
with Image.open("hopper.png") as im:
im.save("out.jpg")

View File

@ -6,6 +6,7 @@ Release Notes
.. toctree:: .. toctree::
:maxdepth: 2 :maxdepth: 2
7.0.0
6.2.1 6.2.1
6.2.0 6.2.0
6.1.0 6.1.0