Deprecations and removals¶
This page lists Pillow features that are deprecated, or have been removed in past major releases, and gives the alternatives to use instead.
Below are features which are considered deprecated. Where appropriate,
DeprecationWarning is issued.
Setting the size of TIFF images¶
Deprecated since version 5.3.0.
Setting the image size of a TIFF image (eg.
im.size = (256, 256)) issues
Setting the size of a TIFF image directly is deprecated, and will be removed in a future version. Use the resize method instead.
PILLOW_VERSION and VERSION constants¶
Deprecated since version 5.2.0.
Two version constants –
VERSION (the old PIL version, always 1.1.7) and
PILLOW_VERSION – have been deprecated and will be removed in the next
major release. Use
Undocumented ImageOps functions¶
Deprecated since version 4.3.0.
Several undocumented functions in
ImageOps have been deprecated. They issue
DeprecationWarning informing which equivalent to use from
Deprecated since version 4.0.0.
The vendored version of olefile has been removed. Attempting to import
PIL.OleFileIO issues a
DeprecationWarning (from 4.0.0) or raises
ImportError (from 5.0.0):
PIL.OleFileIO is deprecated. Use the olefile Python package instead. This module will be removed in a future version.
Deprecated features are only removed in major releases after an appropriate period of deprecation has passed.
Removed in version 4.0.0.
The vendored version of the olefile Python package was removed in favour of the
upstream package. Install if needed (eg.
pip install olefile).