Commits

cthedot committed 6091e1b

updates for release 0.9.4a1

Comments (0)

Files changed (2)

 what is it
 ----------
-A CSS Cascading Style Sheets library for Python.
+A Python package to parse and build CSS Cascading Style Sheets.
 
-Partly implements the DOM Level 2 Style Stylesheets and CSS interfaces. An implementation of the WD CSS Module: Namespaces which has no official DOM yet is included since v0.9.1.
-
-changes since 0.9.2b4
+main changes since 0.9.3
 ---------------------
-for full details see the relevant README file http://cssutils.googlecode.com/svn/tags/TAG_0.9.3a1/README.txt
+for full details see the relevant README file http://cssutils.googlecode.com/svn/tags/TAG_0.9.4a1/README.txt
 
 main changes
-    - FEATURE: Implemented css.CSSValue, css.CSSPrimitiveValue and css.CSSValueList. 
-        
-        Not yet implemented are:        
-            - css.CSSPrimitiveValue.getCounterValue and css. Counter
-            - css.CSSPrimitiveValue.getRGBColorValue and css.RGBColor
-            - css.CSSPrimitiveValue.getRectValue and css.Rect
-    
-        + FEATURE: css.CSSValueList is iterable so may be used in a for loop
-        + FEATURE: CSSValue has property ``cssValueTypeString`` which is the name of the relevant ``cssValueType``, e.g. "CSS_PRIMITIVE_TYPE". Mainly useful for debugging.
-        + FEATURE: CSSPrimitiveValue has property ``primitiveTypeString`` which is the name of the relevant ``primitiveType``, e.g. "CSS_PX". Mainly useful for debugging.
-        + CSSValue has an init Parameter ``_propertyname`` to set a context property for validation. If none is set the value is always invalid. **THIS MAY CHANGE!**
-    
-    - FEATURE (**experimental**): CSSStyleDeclaration is iterable now. The iterator returns *all* properties set in this style as objects with properties ``name``, ``cssValue`` and ``priority``. Calling CSSStyleDeclaration.item(index) on the other hand simply returns a property name and also only the normalized name (once). Example::
-    
-            sheet = cssutils.parseString('a { color: red; c\olor: blue; left: 0 !important }')
-            for rule in sheet.cssRules:
-                style = rule.style
-                for property in style:
-                    name = property.name
-                    cssValue = property.cssValue
-                    priority = property.priority
-                    print name, '=', cssValue.cssText, priority
-                    
-                # prints:
-                # color = red
-                # c\olor = blue
-                # left = 0 !important
-        
-                for i in range(0, style.length):
-                    name = style.item(i)
-                    cssValue = style.getPropertyCSSValue(name)
-                    priority = style.getPropertyPriority(name)
-                    print name, '=', cssValue.cssText , priority
-        
-                # prints:
-                # color = blue
-                # left = 0 !important
-    
-    - FEATURE (**experimental**): added ``CSSStyleSheet.replaceUrls(replacer)`` which may be used to adjust all "url()" values in a style sheet (currently in CSSStyleDeclaration and CSSImportRules).
-    
-    - FEATURE: added ``CSSStyleDeclaration.getCssText(separator=None)`` which returns serialized property cssText, each property separated by given ``separator`` which may e.g. be u'' to be able to use cssText directly in an HTML style attribute. ";" is always part of each property (except the last one) and can **not** be set with separator!
-    
-    - FEATURE: ``href`` and ``media`` arguments can now be passed to ``parse()`` and ``parseString()`` functions and methods. This sets the appropriate attributes on the generated stylesheet objects.
-    
-    - FEATURE: CSSMediaRule has an init parameter ``mediaText`` synchronous to CSSImportRule now
-    
-    - FEATURE: The ``MediaList`` constructor can now be passed a list of media types.
-    
-    - FEATURE: ``CSSRule`` and subclasses have a property ``typeString`` which is the name of the relevant ``type``, e.g. ``STYLE_RULE``. Mainly useful for debugging.
-    
-    - FEATURE: ``cssutils.serialize.Preferences`` has a new option ``lineSeparator`` that is used as linefeed character(s). May also be set to ``u''`` for ``CSSStyleDeclareation.cssText'`` to be directly usable in e.g. HTML style attributes
+   - **FEATURE**: Added a new module ``cssutils.codec`` that registers a codec that can be used for encoding and decoding CSS. (http://www.w3.org/TR/2006/WD-CSS21-20060411/syndata.html#q23)
 
-    + API CHANGE (internal): renamed serializers method ``do_stylesheet`` to ``do_CSSStyleSheet``
+    - **FEATURE**: Added implementation of ``stylesheets.MediaQuery`` which are part of  stylesheets.MediaList. See the complete spec at http://www.w3.org/TR/css3-mediaqueries/ for details.
 
-    - BUGFIX (issue #9): Parsing of empty ``url()`` values has been fixed 
-    - BUGFIX: Handling of linenumbers in the serializer has been fixed.
-    - BUGFIX (minor): removed debug output in CSSStyleDeclaration
+    + **API CHANGE**: ``CSSNamespacerule.uri`` is renamed to ``CSSNamespaceRule.namespaceURI`` which is defined is CSSOM. ``uri`` is deprecated and still available but the constructor parameter is named ``namespaceURI`` in any case now.
 
-    + CHANGE (experimental!): CSSStyleDeclaration.getPropertyCSSValue() for shorthand properties like e.g. ``background`` should return None. cssutils returns a CSSValueList in these cases now. Use with care as this may change later
-    
-    + CHANGE: CSSValue default cssText is now ``u""`` and not ``u"inherit"`` anymore
-    
-    + CHANGE: ``css.CSSStyleDeclaration.cssText`` indents its property not anymore.
-    
-    + CHANGE: ``cssutils.serialize.CSSSerializer`` has been refactored internally to support the lineSeparator option.
-    
-    + CHANGE: The Selector and SameNamePropertyList (which might be renamed as it is experimental) class are now available from cssutils.css too.
-    
-    + CHANGE: Tokenizer strips HTML comment tokens CDO and CDC from tokenlist now.
+    + **API CHANGE**: As ``stylesheets.MediaQuery`` is implemented now all classes using an instance of ``stylesheets.MediaList`` are presented slightly different. Until now a simple list of string was given, now the list contains MediaQuery objects.
 
-    + CHANGE: Added __repr__ and __str__ methods to most classes. __str__ reports e.g. ``<cssutils.css.CSSImportRule object href=None at 0xaaa870>``, __repr__  e.g. ``cssutils.css.CSSImportRule(href=None, mediaText=u'all')`` which is a valid contructor  for the object in most cases (which might not be complete for all init parameter for all classes like in this case though). The following details are included:
-    
-      css
-        - CSSStyleSheet shows the title and href
-        - CSSCharsetRule shows the encoding
-        - CSSCharsetRule shows the cssText (not in __str__ though)
-        - CSSImportRule shows the href and the MediaList mediaText
-        - CSSMediaRule shows the MediaList mediaText
-        - CSSNameSpaceRule shows the prefix and uri
-        - CSSPageRule shows the selectorText
-        - CSSStyleRule shows the selectorText
-        - CSSUnknownRule shows nothing special
-        - CSSStyleDeclaration shows the number of properties set for __str__ but an empty CSSStyleDeclaration constructor for __repr__ as showing cssText might be way too much
-        - SameNamePropertyList shows the name
-        - CSSValue, CSSPrimitiveValue show the actual value for __repr__, some details for __str__
-        - CSSValueList shows an __repr__ which is **not** possible to ``eval()`` and some details for __str__
-        - _Property shows infos but should be used directly for now anyway!
-        - Selector the selectorText
-      
-      stylesheets
-        - MediaList shows the mediaText
+    + **API CHANGE**: ``_Property`` has been renamed to ``css.Property`` and is used in context of ``CSSStyleDeclaration`` and ``MediaQuery``. Attribute ``Property.value`` has been *de-deprecated* and may be used normally now (again). The Property constructor has only optional parameters now.
 
+    + **API CHANGE**: Removed experimental class ``SameNamePropertyList`` which was used in ``CSSStyleDeclaration`` and also method ``CSSStyleDeclaration.getSameNamePropertyList``. A new method ``CSSStyleDeclaration.getProperties()`` has been added which is simpler and more useful
+
+    + **API CHANGE**: renamed attribute ``namespaces`` of CSSStyleSheet and Selector to ``prefixes`` as they really are the prefixes of declared namespaces
+
+    + BUGFIX: Tantek hack (using ``voice-family``) should work now as SameNamePropertyList is removed and properties are kept in order
+
+    - **CHANGE**: A completely new tokenizer and mostly also the parser have been reimplemented in this release. Generally it should be much more robust and more compliant now. It will have new errors and also some slight details in parsing are changed.
+
+    + **Documentation**: Added some docs in reStructuredText format including a basic server to view it as HTML. The HTML may be published as well.
 
 license
 -------
 
 download
 --------
-for download options for cssutils 0.9.3a1 - 070905 see http://cthedot.de/cssutils/
+for download options for cssutils 0.9.4a1 - 071020 see http://cthedot.de/cssutils/
 
 cssutils needs
-* Python 2.4 or higher (tested with Python 2.5 on Windows XP only)
+* Python 2.4 or higher (tested with Python 2.5 on Vista only)
 
 
 bug reports, comments, etc are very much appreciated!
 thanks
-christof 
+Christof
 
     + BUGFIX: Token CHARSET_SYM is now as defined in the CSS 2.1 Errata as literal "@charset " including the ending space.
 
-    - **CHANGE**: A completely new tokenizer and mostly also the parser has been implemented in this release. Generally it should be much more robust and more compliant now. It will have new errors and also some slight details in parsing are changed.
+    - **CHANGE**: A completely new tokenizer and mostly also the parser have been reimplemented in this release. Generally it should be much more robust and more compliant now. It will have new errors and also some slight details in parsing are changed.
 
     + **Documentation**: Added some docs in reStructuredText format including a basic server to view it as HTML. The HTML may be published as well.