#12133 closed defect (fixed)
Dependency not satisfied even if pillow installed
Reported by: | Ryan J Ollos | Owned by: | Ryan J Ollos |
---|---|---|---|
Priority: | normal | Milestone: | plugin - spam-filter |
Component: | plugin/spamfilter | Version: | |
Severity: | normal | Keywords: | |
Cc: | Dirk Stöcker | Branch: | |
Release Notes: |
Replaced |
||
API Changes: | |||
Internal Changes: |
Description (last modified by )
In #11031 / [11730] the code was modified to support pillow
in addition to pil
. However, since [4181], the package PIL
is required in setup.py
. Installing Pillow
doesn't seem to be sufficient to satisfy the dependency.
I don't see a simple way to specify Pillow
or PIL
in setup.py
's extras_require
. It might be easiest, since PIL
doesn't seem to be maintained any longer, to just require Pillow
.
# ./trac-hacks.org/pve/bin/python Python 2.7.9 (default, Mar 1 2015, 12:57:24) [GCC 4.9.2] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> import pkg_resources >>> pkg_resources.get_distribution('pillow').version '2.9.0'
For now I just use the following in my install scripts:
sed -i -e 's/pil/pillow/g' $src/spam-filter/setup.py
Attachments (1)
Change History (11)
comment:2 by , 9 years ago
Note to update SpamFilter#Requirements if requirements are changed to use Pillow
.
comment:3 by , 9 years ago
Milestone: | → plugin - spam-filter |
---|
comment:4 by , 9 years ago
Found the following in the logs, possibly relevant:
2015-09-23 22:59:03,863 Trac[main] ERROR: Internal Server Error: <RequestWithSession "GET '/captcha/image'">, referrer 'https://trac-hacks.org/captcha' Traceback (most recent call last): File "build/bdist.linux-i686/egg/trac/web/main.py", line 554, in _dispatch_request dispatcher.dispatch(req) File "build/bdist.linux-i686/egg/trac/web/main.py", line 247, in dispatch resp = chosen_handler.process_request(req) File "/srv/trac-hacks.org/pve/lib/python2.6/site-packages/TracSpamFilter-1.0.6.dev0-py2.6.egg/tracspamfilter/captcha/image.py", line 80, in process_request self.font_size) File "/srv/trac-hacks.org/pve/lib/python2.6/site-packages/TracSpamFilter-1.0.6.dev0-py2.6.egg/tracspamfilter/captcha/image.py", line 108, in gen_captcha font = ImageFont.truetype(fnt,fnt_sz) File "/usr/lib/python2.6/dist-packages/PIL/ImageFont.py", line 218, in truetype return FreeTypeFont(filename, size, index, encoding) File "/usr/lib/python2.6/dist-packages/PIL/ImageFont.py", line 134, in __init__ self.font = core.getfont(file, size, index, encoding) IOError: cannot open resource
comment:5 by , 9 years ago
Description: | modified (diff) |
---|
comment:6 by , 9 years ago
Cc: | added |
---|---|
Owner: | changed from | to
Status: | new → assigned |
by , 9 years ago
Attachment: | t12133.diff added |
---|
comment:8 by , 9 years ago
I also propose to bump the version to 1.0.6
(from 1.0.6dev
) after this change, and to bump the version more frequently since we no longer have the svn revision in the egg name (#12038).
comment:9 by , 9 years ago
Release Notes: | modified (diff) |
---|---|
Resolution: | → fixed |
Status: | assigned → closed |
Committed in [14379].
comment:10 by , 8 years ago
Replying to Ryan J Ollos:
Another consideration - when branching for Trac 1.2, support for Pillow < 2 can be dropped. See Pillow's supported python versions.
Addressed in r15231.
Another consideration - when branching for Trac 1.2, support for Pillow < 2 can be dropped. See Pillow's supported python versions.