(python-xhtml2pdf) |
(rapid-photo-downloader is clean) |
||
Line 125: | Line 125: | ||
* python-tgcaptcha | * python-tgcaptcha | ||
* python-trml2pdf | * python-trml2pdf | ||
* sK1 | * sK1 | ||
* scribus | * scribus | ||
Line 165: | Line 164: | ||
* python-qrcode | * python-qrcode | ||
* python-xhtml2pdf | * python-xhtml2pdf | ||
* rapid-photo-downloader | |||
* uniconvertor | * uniconvertor | ||
Revision as of 23:58, 16 January 2013
Feature Name Pillow
Summary
Replace PIL (python-imaging) with Pillow, an actively maintained fork which is also heading for python3 compatibility
Owner
- Name: Sandro Mani
- Email: manisandro (at) gmail (dot) com
Current status
- Targeted release: Fedora 19
- Last updated: 2012-12-23
- Percentage of completion: 40%
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].
- [1] https://github.com/python-imaging/Pillow/
- [2] http://mail.python.org/pipermail/image-sig/2012-October/007059.html
- [3] https://github.com/fluggo/Pillow
- [4] http://mail.python.org/pipermail/image-sig/2012-December/007120.html
Benefit to Fedora
- Actively maintained python imaging library
- Python 3 compatibility
Scope
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
- 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)
- Post a new package review process
- Notify maintainers of packages depending on PIL, push package to repositories
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.
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 RHBZ bug 889784) and install, or wait until the package is in the repos, 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.
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
Dependencies
Tracker bug for implementing the switch to pillow
https://bugzilla.redhat.com/show_bug.cgi?id=894484
Problem building pillow for python3
Packages needing porting to work with pillow
- PySolFC -- Patch attached to bug
- asymptote -- Patch attached to bug
- bkchem -- Patch attached to bug
- cinnamon-settings -- Patch attached to bug
- comix -- Patch attached to bug
- decibel-audio-player -- Patch attached to bug
- gausssum -- Patch attached to bug
- gourmet -- Patch attached to bug
- gpodder -- Patch attached to bug
- gwibber -- Patch attached to bug
- hplip -- Patch attached to bug
- impressive -- Patch attached to bug
- jbrout -- Patch attached to bug
- mcomix -- Patch attached to bug
- memaker -- Patch attached to bug
- nml -- Patch attached to bug
- opencv-python -- Patch attached to bug
- openxcap -- Patch attached to bug
- pogo -- Patch attached to bug
- pony -- Patch attached to bug
- pyicq-t -- Patch attached to bug
- phatch-cli -- Patch attached to bug
- tucan -- Patch attached to bug
- trac-spamfilter-plugin -- Patch attached to bug
- wallpapoz -- Patch attached to bug
- wavextract -- Patch attached to bug
Packages needing evaluation for porting
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 -- Toshio has one)
- python-textile (and needs a dep on PIL)
- python-tgcaptcha
- python-trml2pdf
- sK1
- scribus
- spe
Packages not needing porting
- python-imaging-devel (obsoleted by pillow)
- python-imaging-sane (obsoleted by pillow)
- python-imaging-tk (obsoleted by pillow)
Packages already ported
- 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-xhtml2pdf
- rapid-photo-downloader
- uniconvertor
Contingency Plan
Simply keep shipping the current python-imaging-1.1.7
Documentation
Pillow homepage and discussions:
- https://github.com/python-imaging/Pillow/
- http://mail.python.org/pipermail/image-sig/2012-October/007059.html
- http://mail.python.org/pipermail/image-sig/2012-December/007120.html
Initial discussion on fedora-devel:
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 istead of simply
import <Module>
This change does not break backwards compatibility with the legacy PIL.