On 2013-02-27 22:00:17 +0000, Alex Ogier said:

On Wed, Feb 27, 2013 at 4:42 PM, Aymeric Augustin
<[email protected]> wrote:

On 27 févr. 2013, at 21:40, Marijonas Petrauskas <[email protected]> wrote:

Why isn't Pillow the recommended Django image library yet? PIL has
been unmaintained for almost 3 years and has a number of annoying bugs
(e.g. fails to open some valid JPEG files, maybe has some security
issues as well). Pillow, on the other hand, is a backwards-compatible
community-maintained fork, which has most of those issues fixed and
will even support Python 3 soon.

I think this change would involve (1) running the test suite with
Pillow, (2) updating the documentation and (3) updating the ImageField
warning shown when PIL is not installed. Looks like an easy change.
What do you think?


Yes, we'll have to choose a Python 3-compatible replacement for PIL.

I've converted your email into a ticket: https://code.djangoproject.com/ticket/19934

I assume that Pillow and PIL are API-compatible. Django could fallback to PIL
if Pillow isn't installed, to preserve backwards compatibility.

--
Aymeric


This seems like pretty much a no-brainer. PIL is a notoriously
backwards python package and more or less abandonware, and Pillow is a
well-supported fork.

As regards API-compatibility, Pillow is so much compatible that it
even installs to the same locations. Unless you manually check for it,
you shouldn't even notice that you are getting Pillow libraries
instead of PIL libraries. Which means that supporting pillow *should*
be as easy as Marijonas suggests, unless there actually are real
regressions.


There should be very few regressions because prior to Pillow 2.0 (which is unreleased, and will support Python 2.6 - Python 3.3), we've made very few, if any, image code fixes. (And for whatever it's worth, whenever such fixes were considered, we attempted to track them with the "upstream" PIL).

In any event, if you do find a regression please report it here:

- https://github.com/python-imaging/Pillow/issues

Peer reviewed pull requests for such issues will be merged and released promptly :-)


Just install it instead of or in addition to PIL when
testing,


I would recommend removing PIL first, as I think we've seen some issues related to both PIL & Pillow being installed simultaneously. (And both distributions provide the same packages/modules, similar to the way "distribute" provides the "setuptools" package.)


and update any documentation that refers to PIL and
ImageFields to recommend Pillow instead.


+1. The only thing Pillow could not provide was the distribution name "PIL" on PyPI. So you must "pip install Pillow" instead of PIL. Everything else e.g. "from PIL import Image" should be the same.


Alex Clark, Pillow (PIL fork) author



Best,
Alex Ogier


--
Alex Clark · http://about.me/alex.clark


--
You received this message because you are subscribed to the Google Groups "Django 
developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/django-developers?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to