Edgewall Software

Opened 9 years ago

Closed 9 years ago

Last modified 9 years ago

#11031 closed enhancement (fixed)

RFE: Update Image imports to support pillow

Reported by: paul@… Owned by: Dirk Stöcker
Priority: normal Milestone: plugin - spam-filter
Component: plugin/spamfilter Version:
Severity: normal Keywords:
Cc: Branch:
Release Notes:
API Changes:
Internal Changes:


Fedora Linux (and possibly other downstream distributions) are moving from the traditional python imaging library to a fork called "pillow" that is more maintained and will have python 3 compatibility. This move is largely backwards-compatible but one thing that is not fully compatible is the way the imports work.

Currently, the imports can look like:

import Image
import ImageFont
import ImageDraw
import ImageFilter


from PIL import Image
from PIL import ImageFont
from PIL import ImageDraw
from PIL import ImageFilter

but pillow only supports the latter. If you could update captcha/image.py to use the latter format rather than the former then the code would support both libraries.

More details on this change can be found here: http://fedoraproject.org/wiki/Features/Pillow

Attachments (1)

pillow.patch (648 bytes ) - added by sgallagh@… 9 years ago.
Proposed Fedora patch

Download all attachments as: .zip

Change History (5)

by sgallagh@…, 9 years ago

Attachment: pillow.patch added

Proposed Fedora patch

comment:1 by Christian Boos, 9 years ago

Milestone: plugin - spam-filter
Owner: changed from Dirk Stöcker to Christian Boos
Status: newassigned

comment:2 by Dirk Stöcker, 9 years ago

Resolution: fixed
Status: assignedclosed

In r11728.

comment:3 by Ryan J Ollos <ryan.j.ollos@…>, 9 years ago

Owner: changed from Christian Boos to Dirk Stöcker

I ran into a similar issue with the th:OdtExportPlugin, and found that from PIL import Image was failing on Debian 6. Based on this SO reply, I went with the following solution:

    from PIL import Image
except ImportError:
    import Image

See [th 12786]. I thought this might be of interest here.

comment:4 by Dirk Stöcker, 9 years ago

See r11730.

Modify Ticket

Change Properties
Set your email in Preferences
as closed The owner will remain Dirk Stöcker.
The resolution will be deleted. Next status will be 'reopened'.
to The owner will be changed from Dirk Stöcker to the specified user.

Add Comment

E-mail address and name can be saved in the Preferences .
Note: See TracTickets for help on using tickets.