Opened 7 years ago

Last modified 3 years ago

#651 new enhancement

Switch to Pillow?

Reported by: Christopher Allan Webber Owned by:
Priority: major Milestone:
Component: programming Keywords:
Cc: Parent Tickets:

Description

This has been mentioned by willkg in several previous bugs: #392 #57 (and one where someone mentioned it as a fix: #412) but maybe we should switch from PIL to Pillow; PIL seems to be better maintained: https://pypi.python.org/pypi/Pillow/

However, we shouldn't just make this switch without considering the implications. For example, we are currently shooting for Debian packaging, but Pillow is not packaged in Debian. Pillow is apparently backwards compatible though?

Subtickets

Change History (9)

comment:1 Changed 6 years ago by Christopher Allan Webber

Tsyesika points out that debian, redhat, et c seems to still be using PIL, so switching entirely over this might be an issue there.

comment:2 Changed 6 years ago by Simon Fondrie-Teitler

Debian has it in the experimental version of python-imaging, however there is a bug that is stopping it from continuing. While the module is backward compatible, the import statement is not. As I say in the bug report, this is deliberate and necessary to get setuptools working.

http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=711343

comment:3 Changed 4 years ago by Jessica Tallon

CentOS 7 now has pillow, since we dropped python 2.6 support there is only the x86_64 bit version of CentOS 6 which doesn't have pillow. I suggest we go forth and switch, it seems everyone else is.

comment:4 Changed 4 years ago by ayleph

I don't think this is an OS-specific issue. Pillow is available on PyPI, so regardless of what packages are available for a specific distro, one should be able to install Pillow in their mediagoblin environment using pip or easy_install. We could add this to setup.py.

comment:5 Changed 4 years ago by Jessica Tallon

We can't add PIL or Pillow to setup.py without requiring the user also have gcc and other build utilities installed. Pillow (like PIL) requires some compilation (it's a mixture of C and python IIRC). We currently don't want to ask people to have those installed so we rely on the package manager to provide them.

comment:6 Changed 4 years ago by ayleph

Oh, I see. Understood.

comment:7 Changed 4 years ago by Christopher Allan Webber

So I think at this point, this is just a documentation change, right?

commit d0e9f843e23196f790b640327bef3718e74b0347
Author: Alon Levy <alon@pobox.com>
Date:   Mon Apr 8 11:19:56 2013 +0300

    PIL: Support systems with Pillow and without
    
    Fixes for systems with Pillow, but leaves a "try: except ImportError" to
    support anything that doesn't have a PIL top level import.
    
    Signed-off-by: Alon Levy <alon@pobox.com>

It looks like we just have to switch the documentation over to recommending Pillow and dropping references to PIL. We could then also drop support for PIL specifically in the imports; no need to support both anymore...

comment:8 Changed 4 years ago by Jessica Tallon

Yep, I believe so. I actually use pillow on all my dev servers already ;)

comment:9 Changed 3 years ago by Ben Sturmfels

Netbulae notes in #911 "configure: error: Python Imaging Library is required" that Fedora 20 doesn't have python-imaging and instead has python-pillow. Keeping that ticket open, since it could probably be solved simply by updating documentation.

Note: See TracTickets for help on using tickets.