1. cthedot
  2. cssutils

Commits

cthedot  committed bade2c3

prepared 0.9.5.1 release

  • Participants
  • Parent commits 427e467
  • Branches default
  • Tags TAG_0.9.5.1

Comments (0)

Files changed (3)

File ANN.txt

View file
  • Ignore whitespace
 ----------
 A Python package to parse and build CSS Cascading Style Sheets. (Not a renderer  though!)
 
-release
--------
-0.9.5 had been in development for about half a year and this is the first *final* release for quite some time now - actually the last has been 0.6 ... It is nevertheless definitely not perfect but tests have been expanded, included scripts should all work and all examples on the website have been checked. 0.9.6 will start soon ...
+about this release
+------------------
+0.9.5.1 is a bugfix release.
 
 main changes
 ------------
-0.9.5 080730
-     - **API CHANGE**: If a new medium is trying to be appended to a ``MediaList`` already set to ``all`` an ``xml.dom.InvalidModificationErr`` is raised. The exception to this handling is adding ``handheld`` which is a special case for Opera and kept for now. This special handling may be removed in the future. A ``WARNING`` is logged in any case.
+0.9.5.1 080811
+    + **BUGFIX**: Fixed parsing of ``}a,b`` which resulted in TypeError until now.
 
-    - **BUGFIX**: Fixed reference error in @import rule preventing change of the used ``MediaList``.
+    + **BUGFIX**: A rule with a selector using an undefined and therefor invalid namespace prefix is ignored now.
 
-    - **BUGFIX**: Deeply nested ``CSSImportRule``\ s with different encodings  should keep the encoding as defined (via HTTP, parendSheet, @charset etc) now.  Therefor ``cssutils.util._readUrl`` does return ``(encoding, enctype, decodedCssText)`` now where ``enctype`` is a number from 0 to 5 indicating which encoding type was used: 0 for encoding override, 1 for HTTP encoding, 2 for BOM or @charset rule, (3 is unused currently), 4 for encoding of the parent sheet and 5 if encoding defaults to UTF-8 as no other information is available. (This may later be done as constants but this function should not be used from programs generally).
+    + **BUGFIX**: Removed typo in MediaList which resulted in Exception when parsing medialist containing ``all`` and another media.
 
-    - **BUGFIX**: Replaced usage of ``WindowsError`` with ``OSError``. I (naively ;) thought ``WindowsError`` at least be present in environments other than Windows but it just results in a ``NameError``... The part of the API which triggered this Exception is an @import rule with an invalid or local (file) URI so should have happened quite rarely anyway.
+    + **BUGFIX**: Reading imported styles may have failed under certain conditions with an AttributeError.
 
-    + IMPROVEMENT: Standalone scripts ``csscombine`` and ``csscapture`` are available for programmatic use in ``cssutils.script.csscombine`` and ``cssutils.script.CSSCapture`` res.
-    + IMPROVEMENT: ``cssutils.script.csscombine`` and ``csscombine`` script do use the cssutils log now instead of just writing messages to ``sys.stderr``
-    + IMPROVEMENT: Optimized and refactored tokenizer (CHARSET_SYM).
+    + FEATURE: Added ``cssutils.VERSION`` which is the current release version, in this case e.g. ``"0.9.5.1"``
+
+    + IMPROVEMENT: Optimized imports and partly removed circular ones which are a bit tricky...
+
 
 Note:
     CSSValue, CSSValueList, and CSSPrimitiveValue and the relevant methods/properties Property.cssValue and CSSStyleDeclaration.getPropertyCSSValue are more or less DEPRECATED and will probably be replaced with interfaces defined in CSSOM. For now use the properties and methods that handle values as simple strings, e.g. ``Property.value``. As the aforementioned classes are not hardly that useful anyway this should not be a big problem but please beware if you use or have used them.

File CHANGELOG.txt

View file
  • Ignore whitespace
 0.9.5
 -----
 0.9.5.1 080811
-    + **BUGFIX**: Fixed parsing of "}a,b" resulting in TypeError
+    + **BUGFIX**: Fixed parsing of ``}a,b`` which resulted in TypeError until now.
+
+    + **BUGFIX**: A rule with a selector using an undefined and therefor invalid namespace prefix is ignored now.
 
     + **BUGFIX**: Removed typo in MediaList which resulted in Exception when parsing medialist containing ``all`` and another media.
 

File src/try.py

View file
  • Ignore whitespace
 
 
 if 1:
-    css = r'''
-    color: red;
-    /* properties might be set more than once for different UAs */
-    c\olor: green;
-    background-color: #fff
-    '''
-    s = cssutils.css.CSSStyleDeclaration(cssText=css)
-    for p in s:
-        print repr(p)
-
-
-    
+    s = cssutils.parseString('a|a { color: red }')
+    print s
+    print s.cssText
+    print 
+    s.cssText = 'a|a { color: red }'
+    print s
+    print s.cssText
     
     sys.exit(1)