[Image-SIG] Pillow, the "friendly" PIL fork

Fredrik Lundh fredrik at pythonware.com
Sun Aug 1 21:34:00 CEST 2010


2010/8/1 Alex Clark <aclark at aclark.net>:

> So if I understand you correctly, Fredrik, you are saying that you are
> adhering to what was once a standard and that you are skeptical about new
> standards (which is certainly reasonable).

The great thing with standards is that there are so many to chose from :-)

But seriously, I don't really care about the standards themselves; I
do care a *lot* about compatibility and cost of upgrading, though.  In
my experience, people have better things to do with their time than to
rewrite their code just to keep using the functionality they already
have.

> Regardless of standards, if I understand things correctly, some code
> supports:
>
>  import Image
>
> While other code requires:
>
>  from PIL import Image
>
> To work properly.

PIL's installed in the the PIL package so the "from PIL import" form
always works.  There are tons of books and code out there using the
"import Image" form (PIL is old enough that packages didn't even exist
when it was first released), so the installer also provides a PIL.pth
file that causes Python's import machinery to add the directory to the
path as well.

I'm not very eager to break that for the current generation of the
library, for Python 2.X.

(It should also be noted that PIL actually predates Zope, so it's Zope
that's doing namespace squatting here, not PIL :)

> So, we have a "human" problem. If everyone could agree on a single format
> and to update all their code we could move forward (also a logistical
> problem).

Sounds to me like the most practical way to solve this is to have
Zope's installation framework tell PIL's setup script that it doesn't
care about backwards compatibility via some kind of "altinstall"
mechanism.  I don't know enough about zc.buildout (?) to know how such
a mechanism would look, but I'm open for suggestions.

</F>


More information about the Image-SIG mailing list