Merge lp:~cjwatson/launchpad/pil-image into lp:launchpad

Proposed by Colin Watson
Status: Merged
Merged at revision: 18646
Proposed branch: lp:~cjwatson/launchpad/pil-image
Merge into: lp:launchpad
Diff against target: 23 lines (+2/-2)
2 files modified
lib/lp/services/doc/sprites.txt (+1/-1)
lib/lp/services/spriteutils.py (+1/-1)
To merge this branch: bzr merge lp:~cjwatson/launchpad/pil-image
Reviewer Review Type Date Requested Status
William Grant code Approve
Review via email: mp+345391@code.launchpad.net

Commit message

Use "from PIL import Image" rather than "import Image".

The latter is deprecated, and no longer works in bionic.

Description of the change

We should probably move this into the virtualenv at some point rather than relying on a system dependency, but that'll require new -dev dependencies and is generally a bit more complicated than just chasing the module renaming.

To post a comment you must log in.
Revision history for this message
William Grant (wgrant) :
review: Approve (code)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'lib/lp/services/doc/sprites.txt'
--- lib/lp/services/doc/sprites.txt 2015-03-19 16:44:53 +0000
+++ lib/lp/services/doc/sprites.txt 2018-05-10 23:44:07 +0000
@@ -48,7 +48,7 @@
48in the file can be changed with the margin parameter.48in the file can be changed with the margin parameter.
4949
50 >>> import os, tempfile50 >>> import os, tempfile
51 >>> import Image51 >>> from PIL import Image
52 >>> from lp.services.spriteutils import SpriteUtil52 >>> from lp.services.spriteutils import SpriteUtil
53 >>> root = os.path.abspath(os.path.join(__file__, '../../../../..'))53 >>> root = os.path.abspath(os.path.join(__file__, '../../../../..'))
54 >>> icing = os.path.join(root, 'lib/canonical/launchpad/icing')54 >>> icing = os.path.join(root, 'lib/canonical/launchpad/icing')
5555
=== modified file 'lib/lp/services/spriteutils.py'
--- lib/lp/services/spriteutils.py 2012-06-02 03:14:47 +0000
+++ lib/lp/services/spriteutils.py 2018-05-10 23:44:07 +0000
@@ -18,7 +18,7 @@
18from textwrap import dedent18from textwrap import dedent
1919
20import cssutils20import cssutils
21import Image21from PIL import Image
22import simplejson22import simplejson
2323
2424