ANN: cssutils 0.9.7b1

Christof cthedot at
Sun May 30 19:57:43 CEST 2010

what is it
A Python package to parse and build CSS Cascading Style Sheets. (Not a 
renderer though!)

about this release
0.9.7b1 is a beta release but quite stable now I guess...

main changes
0.9.7b1 optimizes handling speed of CSSVariables *a lot*...

     + **API CHANGE**: Child objects like the ``cssRules`` of a 
``CSSStyleSheet`` or ``CSSMediaRule`` are no longer kept after resetting 
the complete contents of an object (setting ``cssText``). This should 
not be expected anyway but if you relied on something like the following 
please beware::

             sheet = cssutils.parseString('a { color: red}')
             initial_rules = sheet.cssRules
             sheet.cssText = 'b { color: green}'
             # true until 0.9.6a6: assert sheet.cssRules == 
initial_rules, but now:
             assert sheet.cssRules != initial_rules

     + **IMPROVEMENT**: Massive speed improvement of handling of 
CSSVariables of a stylesheet which due to naive implementation was 
unbelievable slow when using a lot of vars... Should now scale a lot 
better, about factor 5-20 depending of amount of variables used.
     + IMPROVEMENT: Fair amount of refactoring resulting in a bit speed 
improvement generally too
     + CHANGE: If a CSS variable should be resolved 
(``cssutils.ser.prefs.resolveVariables == true``) but no value can be 
found a WARNING is logged now. Should be an ERROR actually but as 
currently lots of "fake" errors are reported would probably hurt more 
than help. A future release might improve this.
     + BUGFIX: Syntax of value of CSS Fonts Module Level 3 ``src`` 
property now validates if local font name is given with a quoted name, 
e.g.: ``src: local('Yanone Kaffeesatz')``

cssutils is published under the LGPL version 3 or later, see

If you have other licensing needs please let me know.

For download options see

cssutils needs Python 2.4 or higher or Jython 2.5 and higher (tested 
with Python 2.6.5(x64), 2.5.4(x32), 2.4.4(x32) and Jython 2.5.1 on Win7 
64 only)

Bug reports (via Google code), comments, etc are very much appreciated! 


More information about the Python-announce-list mailing list