Features/Pillow

From FedoraProject

< Features(Difference between revisions)
Jump to: navigation, search
(Last of the python-* packages)
(Python3 packages are now enabled)
 
(20 intermediate revisions by 3 users not shown)
Line 1: Line 1:
= Feature Name Pillow =
+
= Pillow =
  
 
== Summary ==
 
== Summary ==
Line 13: Line 13:
 
== Current status ==
 
== Current status ==
 
* Targeted release: [[Releases/19 | Fedora 19 ]]  
 
* Targeted release: [[Releases/19 | Fedora 19 ]]  
* Last updated: 2012-12-23
+
* Last updated: 2013-03-19
* Percentage of completion: 40%
+
* Percentage of completion: 100%
  
 
<!-- CHANGE THE "FedoraVersion" TEMPLATES ABOVE TO PLAIN NUMBERS WHEN YOU COMPLETE YOUR PAGE. -->
 
<!-- CHANGE THE "FedoraVersion" TEMPLATES ABOVE TO PLAIN NUMBERS WHEN YOU COMPLETE YOUR PAGE. -->
Line 49: Line 49:
 
<!-- What work do the developers have to accomplish to complete the feature in time for release?  Is it a large change affecting many parts of the distribution or is it a very isolated change? What are those changes?-->
 
<!-- What work do the developers have to accomplish to complete the feature in time for release?  Is it a large change affecting many parts of the distribution or is it a very isolated change? What are those changes?-->
 
'''Tasks:'''
 
'''Tasks:'''
* Package Pillow, add obsoletes/provides for python-imaging. '''Done''', src.rpm with Python 3 compatibility available at http://smani.fedorapeople.org/python-pillow-1.7.8-1.fc19.src.rpm
+
* Package Pillow, add obsoletes/provides for python-imaging. '''Done'''
 
* Send some patches for python3 compatibility upstream. '''Done''', see [https://github.com/fluggo/Pillow/pull/2 here]
 
* Send some patches for python3 compatibility upstream. '''Done''', see [https://github.com/fluggo/Pillow/pull/2 here]
* Wait for [https://bugzilla.redhat.com/show_bug.cgi?id=889784 RHBZ bug 889784] ([http://bugs.python.org/issue16754 python issue 16754]) to be fixed (python 3 distutils bug, uses wrong extension when searching for shared objects)
+
* Wait for [https://bugzilla.redhat.com/show_bug.cgi?id=889784 RHBZ bug 889784] ([http://bugs.python.org/issue16754 python issue 16754]) to be fixed (python 3 distutils bug, uses wrong extension when searching for shared objects) '''Done'''
* Post a new package review process
+
* Post a new package review process '''Done''', see [https://bugzilla.redhat.com/show_bug.cgi?id=908114 here]
* Notify maintainers of packages depending on PIL, push package to repositories
+
* Review finished '''Done'''
 +
* Notify maintainers of packages depending on PIL '''Done'''
 +
** Almost all of the packages have been ported as well (few are waiting on upstream releases)
 +
* push package to repositories '''Done'''
 +
* block python-imaging: '''Done''', see [https://fedorahosted.org/rel-eng/ticket/5524 rel-eng ticket]
  
 
'''Action needed by other maintainers:'''
 
'''Action needed by other maintainers:'''
Line 66: Line 70:
  
 
== How To Test ==
 
== How To Test ==
* Grab the src.rpm from http://smani.fedorapeople.org/python-pillow-1.7.8-1.fc19.src.rpm, build (as of writing, python3 needs a patch to build the python3 variant, see [https://bugzilla.redhat.com/show_bug.cgi?id=889784 RHBZ bug 889784]) and install, or wait until the package is in the repos, and simply check whether everything still works.
+
* Install python-pillow from the rawhide repositories (as of writing, compilation of the python3 variant is disabled due to [https://bugzilla.redhat.com/show_bug.cgi?id=889784 RHBZ bug 889784]), and simply check whether everything still works.
  
 
* Possibly patch packages to use
 
* Possibly patch packages to use
Line 82: Line 86:
 
== Dependencies ==
 
== Dependencies ==
  
Tracker bug for implementing the switch to pillow
+
https://bugzilla.redhat.com/show_bug.cgi?id=894484 - Tracker bug for implementing the switch to pillow
  
https://bugzilla.redhat.com/show_bug.cgi?id=894484
+
=== Pillow package needs to be reviewed ===
 +
 
 +
https://bugzilla.redhat.com/show_bug.cgi?id=908114
 +
 
 +
Once done, python-imaging needs to be retired in rawhide.
  
 
=== Problem building pillow for python3 ===
 
=== Problem building pillow for python3 ===
 +
Optional but highly desirable:
 +
 
* [https://bugzilla.redhat.com/show_bug.cgi?id=889784 RHBZ bug 889784]
 
* [https://bugzilla.redhat.com/show_bug.cgi?id=889784 RHBZ bug 889784]
  
 
=== Packages needing porting to work with pillow ===
 
=== Packages needing porting to work with pillow ===
* [https://bugzilla.redhat.com/show_bug.cgi?id=893781 PySolFC] -- Patch attached to bug
+
 
* [https://bugzilla.redhat.com/show_bug.cgi?id=893790 asymptote] -- Patch attached to bug
+
See the tracker:
* [https://bugzilla.redhat.com/show_bug.cgi?id=893804 bkchem] -- Patch attached to bug
+
 
* [https://bugzilla.redhat.com/show_bug.cgi?id=895168 cinnamon-settings] -- Patch attached to bug
+
https://bugzilla.redhat.com/show_bug.cgi?id=894484
* [https://bugzilla.redhat.com/show_bug.cgi?id=895175 comix] -- Patch attached to bug
+
 
* [https://bugzilla.redhat.com/show_bug.cgi?id=895177 decibel-audio-player] -- Patch attached to bug
+
Originally, there were 31 packages needing to apply a patch for the changed imports. As of January 16, there are 2. Those two bugs have had the fix sent upstream and are waiting on an upstream release or statement that the patch looks good.
* [https://bugzilla.redhat.com/show_bug.cgi?id=895195 gausssum] -- Patch attached to bug
+
* [https://bugzilla.redhat.com/show_bug.cgi?id=895238 gourmet] -- Patch attached to bug
+
* [https://bugzilla.redhat.com/show_bug.cgi?id=895245 gpodder] -- Patch attached to bug
+
* [https://bugzilla.redhat.com/show_bug.cgi?id=895248 gwibber] -- Patch attached to bug
+
* [https://bugzilla.redhat.com/show_bug.cgi?id=895266 hplip] -- Patch attached to bug
+
* [https://bugzilla.redhat.com/show_bug.cgi?id=895270 impressive] -- Patch attached to bug
+
* [https://bugzilla.redhat.com/show_bug.cgi?id=895287 jbrout] -- Patch attached to bug
+
* [https://bugzilla.redhat.com/show_bug.cgi?id=895288 mcomix] -- Patch attached to bug
+
* [https://bugzilla.redhat.com/show_bug.cgi?id=895289 memaker] -- Patch attached to bug
+
* [https://bugzilla.redhat.com/show_bug.cgi?id=895290 nml] -- Patch attached to bug
+
* [https://bugzilla.redhat.com/show_bug.cgi?id=895767 opencv-python] -- Patch attached to bug
+
* [https://bugzilla.redhat.com/show_bug.cgi?id=895773 openxcap] -- Patch attached to bug
+
* [https://bugzilla.redhat.com/show_bug.cgi?id=895783 pogo] -- Patch attached to bug
+
* [https://bugzilla.redhat.com/show_bug.cgi?id=895785 pony] -- Patch attached to bug
+
* [https://bugzilla.redhat.com/show_bug.cgi?id=895789 pyicq-t] -- Patch attached to bug
+
* [https://bugzilla.redhat.com/show_bug.cgi?id=895778 phatch-cli] -- Patch attached to bug
+
* [https://bugzilla.redhat.com/show_bug.cgi?id=896257 tucan] -- Patch attached to bug
+
* [https://bugzilla.redhat.com/show_bug.cgi?id=896262 trac-spamfilter-plugin] -- Patch attached to bug
+
* [https://bugzilla.redhat.com/show_bug.cgi?id=895217 wallpapoz] -- Patch attached to bug
+
* [https://bugzilla.redhat.com/show_bug.cgi?id=895214 wavextract] -- Patch attached to bug
+
  
 
=== Packages needing evaluation for porting ===
 
=== Packages needing evaluation for porting ===
  
 +
(Done, all known dependent packages ( found via repoquery --whatrequires python-imaging\* ) have been evaluated.
 
A script to help with finding the places that PIL is used in these packages can be found here: https://fedorahosted.org/fesco/raw-attachment/ticket/985/scan-for-pil.py
 
A script to help with finding the places that PIL is used in these packages can be found here: https://fedorahosted.org/fesco/raw-attachment/ticket/985/scan-for-pil.py
  
* python-polybori (patch needed -- [http://toshio.fedorapeople.org/pillow/polybori-pillow.patch Toshio has one])
 
* python-textile (patch needed -- [http://toshio.fedorapeople.org/pillow/textile-pillow.patch Toshio has one] and needs a dep on PIL)
 
* sK1
 
* scribus
 
* spe
 
  
 
=== Packages not needing porting ===
 
=== Packages not needing porting ===
Line 132: Line 118:
 
* python-imaging-tk (obsoleted by pillow)
 
* python-imaging-tk (obsoleted by pillow)
  
=== Packages already ported ===
+
=== Packages that worked unmodified ===
 +
 
 +
The following packages are not on the [https://bugzilla.redhat.com/show_bug.cgi?id=894484 PILLOW tracker] because they were coded such that they already worked with the import statement that python-pillow uses.
  
 
* ReviewBoard
 
* ReviewBoard
Line 183: Line 171:
 
Pillow is a drop-in replacement for PIL, except that importing modules now requires the
 
Pillow is a drop-in replacement for PIL, except that importing modules now requires the
 
   from PIL import <Module>
 
   from PIL import <Module>
syntax istead of simply
+
syntax instead of simply
 
   import <Module>
 
   import <Module>
 
This change does not break backwards compatibility with the legacy PIL.
 
This change does not break backwards compatibility with the legacy PIL.
Line 191: Line 179:
  
  
[[Category:FeatureReadyForFesco]]
+
[[Category:FeatureAcceptedF19]]
 
<!-- When your feature page is completed and ready for review -->
 
<!-- When your feature page is completed and ready for review -->
 
<!-- remove Category:FeaturePageIncomplete and change it to Category:FeatureReadyForWrangler -->
 
<!-- remove Category:FeaturePageIncomplete and change it to Category:FeatureReadyForWrangler -->
 
<!-- After review, the feature wrangler will move your page to Category:FeatureReadyForFesco... if it still needs more work it will move back to Category:FeaturePageIncomplete-->
 
<!-- After review, the feature wrangler will move your page to Category:FeatureReadyForFesco... if it still needs more work it will move back to Category:FeaturePageIncomplete-->
 
<!-- A pretty picture of the page category usage is at: https://fedoraproject.org/wiki/Features/Policy/Process -->
 
<!-- A pretty picture of the page category usage is at: https://fedoraproject.org/wiki/Features/Policy/Process -->

Latest revision as of 01:05, 19 March 2013

Contents

[edit] Pillow

[edit] Summary

Replace PIL (python-imaging) with Pillow, an actively maintained fork which is also heading for python3 compatibility

[edit] Owner

  • Email: manisandro (at) gmail (dot) com

[edit] Current status

  • Targeted release: Fedora 19
  • Last updated: 2013-03-19
  • Percentage of completion: 100%


[edit] Detailed Description

The PIL project has been rather inactive lately (last release in 2009), and one big issue is the missing python 3 compatibility. There seems to be some general agreement that Pillow [1] is a likely candidate to succeed PIL, and in particular to bring python 3 support, see the discussion at [2]. Pillow describes itself as

 Pillow is the "friendly" PIL fork. PIL is the Python Imaging Library. Pillow was
 started for and is currently maintained by the Plone community. But it is used by
 many other folks in the Python web community, and probably elsewhere too.
 
 The fork author's goal is to foster packaging improvements via:
 
 - Publicized development and solicitation of community support.
 - Exploration of packaging problems within the fork, most noticably
   via adding setuptools support but also via clean up & refactoring
   of packaging code. 

Pillow is practically a drop-in replacement for PIL, except one small issue (see below).

For Python 3, there is a fork which offers Py3 compatibility here [3]. The patches are planed for review and merge into Pillow, see [4].

[edit] Benefit to Fedora

  • Actively maintained python imaging library
  • Python 3 compatibility

[edit] Scope

Tasks:

  • Package Pillow, add obsoletes/provides for python-imaging. Done
  • Send some patches for python3 compatibility upstream. Done, see here
  • Wait for RHBZ bug 889784 (python issue 16754) to be fixed (python 3 distutils bug, uses wrong extension when searching for shared objects) Done
  • Post a new package review process Done, see here
  • Review finished Done
  • Notify maintainers of packages depending on PIL Done
    • Almost all of the packages have been ported as well (few are waiting on upstream releases)
  • push package to repositories Done
  • block python-imaging: Done, see rel-eng ticket

Action needed by other maintainers:

  • repoquery --whatrequires python-imaging* shows there are 74 packages depending on PIL.
  • Pillow is a drop-in replacement for PIL, with one detail: The PIL modules now use relative imports between each other, so it is no longer possible to write
 import Image

but one needs to write

 from PIL import Image

The former variant was only made possible by a PIL.pth file in %{python_sitearch}, and actually looks like a hack for backwards compatibility. (100% compatibility between PIL and Pillow could still be achieved by patching away the relative imports in the python2 variant.)

  • The python-pillow package will Obsolete and Provide python-imaging so there's no need for dependent packages to change their Requires line at this time.

[edit] How To Test

  • Install python-pillow from the rawhide repositories (as of writing, compilation of the python3 variant is disabled due to RHBZ bug 889784), and simply check whether everything still works.
  • Possibly patch packages to use
 from PIL import <Module>

instead of

 import <Module>

Note that the from PIL import <Module> syntax also works with the legacy python-imaging, so such changes will not break backwards compatibility with PIL.

[edit] User Experience

  • For end-users, nothing should change.
  • For developers using the python2 variant, next to nothing should change (except the import thing)
  • For developers wanting a python3 variant, there finally is one available

[edit] Dependencies

https://bugzilla.redhat.com/show_bug.cgi?id=894484 - Tracker bug for implementing the switch to pillow

[edit] Pillow package needs to be reviewed

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

Once done, python-imaging needs to be retired in rawhide.

[edit] Problem building pillow for python3

Optional but highly desirable:

[edit] Packages needing porting to work with pillow

See the tracker:

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

Originally, there were 31 packages needing to apply a patch for the changed imports. As of January 16, there are 2. Those two bugs have had the fix sent upstream and are waiting on an upstream release or statement that the patch looks good.

[edit] Packages needing evaluation for porting

(Done, all known dependent packages ( found via repoquery --whatrequires python-imaging\* ) have been evaluated. A script to help with finding the places that PIL is used in these packages can be found here: https://fedorahosted.org/fesco/raw-attachment/ticket/985/scan-for-pil.py


[edit] Packages not needing porting

  • python-imaging-devel (obsoleted by pillow)
  • python-imaging-sane (obsoleted by pillow)
  • python-imaging-tk (obsoleted by pillow)

[edit] Packages that worked unmodified

The following packages are not on the PILLOW tracker because they were coded such that they already worked with the import statement that python-pillow uses.

  • ReviewBoard
  • autotest-framework-server
  • bodhi-server
  • calibre
  • django-avatar
  • dogtail
  • flumotion(False dep on python-imaging. Bug filed)
  • gdesklet-SlideShow
  • griffith
  • inksmoto(False dep on python-imaging-tk. Bug filed)
  • libhocr-gtk(requires python-imaging-sane which isn't moving into the PIL directory)
  • mapnik-python
  • python-docutils
  • openerp
  • openslides(Needed for its use of reportlab)
  • pkpgcounter
  • puddletag(False dep. Bug filed)
  • pympdtouchgui(False dep. Bug filed)
  • python-djblets
  • python-pygments
  • python-django-avatar
  • python-django-profile
  • python-django-simple-captcha
  • python-django-tracking(False dep. Bug filed)
  • python-fabulous
  • python-glue
  • python-qrcode
  • python-tgcaptcha
  • python-trml2pdf(need to talk to reportlab about having dep there instead)
  • python-xhtml2pdf
  • rapid-photo-downloader
  • uniconvertor

[edit] Contingency Plan

Simply keep shipping the current python-imaging-1.1.7

[edit] Documentation

Pillow homepage and discussions:

Initial discussion on fedora-devel:

[edit] Release Notes

PIL has been replaced with Pillow, an actively maintained fork, which also offers Python 3 compatible modules. Pillow is a drop-in replacement for PIL, except that importing modules now requires the

 from PIL import <Module>

syntax instead of simply

 import <Module>

This change does not break backwards compatibility with the legacy PIL.

[edit] Comments and Discussion