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

Proposed by Tristan Seligmann
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 Needs Information
Review via email: mp+178488@code.launchpad.net
To post a comment you must log in.
Revision history for this message
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
Revision history for this message
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

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: