Re: Pillow, actively developed and (mostly) python3 compatible PIL (python-imaging)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




On 28.12.2012 17:14, José Matos wrote:
On 12/23/2012 02:45 AM, Sandro Mani wrote:
Hello all,

Working on a python project using PIL, and wanting to port it to
python3, I got bitten by the absence of a python3 compatible PIL.
Doing some research, there seems to be an actively developed PIL fork,
called Pillow, which can be found here [1]. It 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.
----
Now, the PIL project has been rather inactive lately (last release in
2009), and there seems to be some general agreement that Pillow is a
likely candidate to succeed PIL, and in particular to bring python3
support see the discussion at [2] and [3]. Now, there already seems to
have been some discussion about adopting it in Fedora (at least, it
was mentioned in [4]), and I'd like to bring up the issue again.

I've packaged the latest Pillow release (1.7.8) here [5], based on the
python-imaging package, and the state is the following
- Compiles for both python2 and python3, both variants pass the
self-tests
- Python 3 support is all upstream code, except for pysane, which I
needed to patch (and I'll propose the changes upstream once github is
back alive)
- Python 2 looks like a drop-in replacement for PIL, except that you
need to write i.e. "from PIL import Image" instead of directly "import
Image" (the latter was allowed only by a PIL.pth file in the
site-packages dir, and looked like a hack anyway - with the changes
for python3 compatibility, the files in the PIL directory use relative
imports, and hence the "import Image" does not work anymore, one could
still patch away the relative imports in the python2 variant for 100%
compatibility though)
- Note: because of what I think is a nasty python3-distutils bug
(shared-library extension incorrect, see [6]) I needed to patch a file
in the python3 distutils modules for the package to compile, see [7].

So, since Pillow seems to be the most likely candidate for
python3-imaging, the questions are:
- Do we want Pillow to succeed PIL in Fedora?
   * According to [3], it is likely that Pillow will soon become an
"unfriendly fork" of PIL, so Pillow-PIL compatibility is likely to
break in the future
   * But still being compatible at the moment, I'd say it would be
easier to make the transition now
- Python2 and 3, or only the python-3 variant?
- Plus some packaging questions for the maintainers (I could
co-maintain if desired):
   * Keep the package name?
   * Need new review request?


- Sandro


[1] https://github.com/python-imaging/Pillow/
[2] http://mail.python.org/pipermail/image-sig/2012-October/007059.html
[3] http://mail.python.org/pipermail/image-sig/2012-December/007120.html
[4] http://mail.python.org/pipermail/image-sig/2012-October/007099.html
[5] http://smani.fedorapeople.org/python-imaging-1.7.8-1.fc19.src.rpm
[6] http://mail.python.org/pipermail/python-dev/2012-December/123278.html
[7] http://smani.fedorapeople.org/python3.3-so_ext.patch
FWIW I have been considering changing the source code to pillow ever
since pillow appeared. :-)

If we make the switch we should do it all the way.

The unfriendly aspect of the fork is due to the fact that pillow will
have more features that PIL.

This is IMHO. :-)

I've written a feature page for the PIL->Pillow switch here [1].

[1] https://fedoraproject.org/wiki/Features/Pillow
--
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxxx
https://admin.fedoraproject.org/mailman/listinfo/devel



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Fedora Announce]     [Fedora Kernel]     [Fedora Testing]     [Fedora Formulas]     [Fedora PHP Devel]     [Kernel Development]     [Fedora Legacy]     [Fedora Maintainers]     [Fedora Desktop]     [PAM]     [Red Hat Development]     [Gimp]     [Yosemite News]
  Powered by Linux