Bug 896262

Summary: Update trac-spamfilter-plugin import of PIL for F19 switch to Pillow
Product: [Fedora] Fedora Reporter: Stephen Gallagher <sgallagh>
Component: trac-spamfilter-pluginAssignee: Paul Howarth <paul>
Status: CLOSED RAWHIDE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: high Docs Contact:
Priority: unspecified    
Version: rawhideCC: a.badger, paul
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: trac-spamfilter-plugin-0.7.3-0.15.20130228svn11702.fc19 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-03-08 13:09:32 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 894484    
Attachments:
Description Flags
Change imports of PIL Library so they'll work with pillow none

Description Stephen Gallagher 2013-01-16 22:31:42 UTC
Created attachment 679886 [details]
Change imports of PIL Library so they'll work with pillow

Description of problem:

Fedora 19 is switching from using python-imaging (PIL) to python-pillow.  This is mostly backwards compatible but importing the python-imaging relevant libraries is undergoing a change.  In PIL, the libraries could either be imported like this:

import Image

or like this:

from PIL import Image

In python-pillow (and thus, Fedora19+), only the latter will work.  I've grepped the sources and found a few import statements that need to be updated.  Patch attached to fix those.  Patch should be upstreamable as PIL supports both the old and new forms of the import.

Version-Release number of selected component (if applicable):
trac-spamfilter-plugin-0.4.7-0.13.20110716svn10756.fc18

Comment 1 Paul Howarth 2013-01-29 13:48:24 UTC
Raised upstream: http://trac.edgewall.org/ticket/11031

I'll update Rawhide in a few days unless upstream has some objections.

Comment 2 Toshio Ernie Kuratomi 2013-02-05 01:54:42 UTC
Thanks!  I'll try to remember to ping this bug when the python-pillow package finishes review.  Since it Provides and Obsoletes python-imaging, packages which use the old style of import will stop working when that enters the repository.

Comment 3 Toshio Ernie Kuratomi 2013-03-06 16:16:03 UTC
The python-pillow package has passed review.  It will enter rawhide in a short time.  Note that this package will then fail to import PIL unless a version with the updated imports is built.

https://bugzilla.redhat.com/show_bug.cgi?id=908114

Comment 4 Paul Howarth 2013-03-08 13:09:32 UTC
No response from upstream so I've done a patched build anyway, updating to a new branch for trac 1.0 support.