From 16dac778472917099a92dffd06a717bcc928d1d5 Mon Sep 17 00:00:00 2001 From: wiredfool Date: Tue, 12 Nov 2013 23:08:47 -0800 Subject: [PATCH] Docs: Noted import change for Image Plugins. Fixes #404, plugin not found --- docs/handbook/writing-your-own-file-decoder.rst | 11 +++++++---- docs/porting-pil-to-pillow.rst | 6 ++++++ 2 files changed, 13 insertions(+), 4 deletions(-) diff --git a/docs/handbook/writing-your-own-file-decoder.rst b/docs/handbook/writing-your-own-file-decoder.rst index caf9dc07e..10833a53e 100644 --- a/docs/handbook/writing-your-own-file-decoder.rst +++ b/docs/handbook/writing-your-own-file-decoder.rst @@ -1,10 +1,13 @@ Writing your own file decoder ============================= -The Python Imaging Library uses a plug-in model which allows you to add your -own decoders to the library, without any changes to the library itself. Such -plug-ins have names like :file:`XxxImagePlugin.py`, where ``Xxx`` is a unique -format name (usually an abbreviation). +The Python Imaging Library uses a plug-in model which allows you to +add your own decoders to the library, without any changes to the +library itself. Such plug-ins usually have names like +:file:`XxxImagePlugin.py`, where ``Xxx`` is a unique format name +(usually an abbreviation). + +.. warning:: Pillow >= 2.1.0 no longer automatically imports any file in the Python path with a name ending in :file:`ImagePlugin.py`. You will need to import your decoder manually. A decoder plug-in should contain a decoder class, based on the :py:class:`PIL.ImageFile.ImageFile` base class. This class should provide an diff --git a/docs/porting-pil-to-pillow.rst b/docs/porting-pil-to-pillow.rst index 93bc672af..a58baac39 100644 --- a/docs/porting-pil-to-pillow.rst +++ b/docs/porting-pil-to-pillow.rst @@ -15,3 +15,9 @@ to this:: The :py:mod:`_imaging` module has been moved. You can now import it like this:: from PIL.Image import core as _imaging + +The image plugin loading mechanisim has changed. Pillow no longer +automatically imports any file in the Python path with a name ending +in :file:`ImagePlugin.py`. You will need to import your image plugin +manually. +