Merge lp:~divmod-dev/divmod.org/1208304-cssutils-api into lp:divmod.org

Proposed by Tristan Seligmann on 2013-08-05
Status: Needs review
Proposed branch: lp:~divmod-dev/divmod.org/1208304-cssutils-api
Merge into: lp:divmod.org
Diff against target: 20 lines (+2/-2)
1 file modified
Mantissa/xmantissa/website.py (+2/-2)
To merge this branch: bzr merge lp:~divmod-dev/divmod.org/1208304-cssutils-api
Reviewer Review Type Date Requested Status
Jonathan Jacobs 2013-08-05 Needs Information on 2013-08-05
Review via email: mp+178488@code.launchpad.net
To post a comment you must log in.
Jonathan Jacobs (jjacobs) wrote :

Doesn't this break compatibility with the previous version of cssutils? I think you might want to write your own replaceUrls in the case where replaceUrls cannot be imported from cssutils.

review: Needs Information
Tristan Seligmann (mithrandi) wrote :

The change in question was made in cssutils 0.9.5b1, released in 2008. This is older than the version in Debian squeeze, so it is unlikely that anyone is using Mantissa with a version of cssutils that still has the old API; thus I don't think there's much point in introducing fallback logic.

Unmerged revisions

2712. By Tristan Seligmann on 2013-08-05

Use the new API.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'Mantissa/xmantissa/website.py'
2--- Mantissa/xmantissa/website.py 2009-07-08 01:51:14 +0000
3+++ Mantissa/xmantissa/website.py 2013-08-05 03:37:23 +0000
4@@ -14,7 +14,7 @@
5 from zope.interface import implements
6
7 try:
8- from cssutils import CSSParser
9+ from cssutils import CSSParser, replaceUrls
10 CSSParser
11 except ImportError:
12 CSSParser = None
13@@ -476,7 +476,7 @@
14 stylesheet = ''.join(self._buffer)
15 parser = CSSParser()
16 css = parser.parseString(stylesheet)
17- css.replaceUrls(self._replace)
18+ replaceUrls(css, self._replace)
19 self.request.write(css.cssText)
20 return self.request.finish()
21

Subscribers

People subscribed via source and target branches

to all changes: