#11031 closed enhancement (fixed)
RFE: Update Image imports to support pillow
Reported by: | 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: |
Description
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
or:
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)
Change History (5)
by , 12 years ago
Attachment: | pillow.patch added |
---|
comment:1 by , 12 years ago
Milestone: | → plugin - spam-filter |
---|---|
Owner: | changed from | to
Status: | new → assigned |
comment:3 by , 12 years ago
Owner: | changed from | to
---|
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:
try: from PIL import Image except ImportError: import Image
See [th 12786]. I thought this might be of interest here.
Proposed Fedora patch