diff options
author | gls <gls@pkgsrc.org> | 2012-05-05 15:20:07 +0000 |
---|---|---|
committer | gls <gls@pkgsrc.org> | 2012-05-05 15:20:07 +0000 |
commit | 0d7bdeb258d1f305fb730811abef173f560a4d19 (patch) | |
tree | 80c0bf76224970005102a4fa4b0f2cea274a4155 /textproc/py-cssutils | |
parent | e27abe89bff78506a0a5e368f488bd0be06fbd58 (diff) | |
download | pkgsrc-0d7bdeb258d1f305fb730811abef173f560a4d19.tar.gz |
Update textproc/py-cssutils to 0.9.9.
Pkgsrc changes:
---------------
Deal with /usr/bin/env python
Upstream changes:
-----------------
0.9.9 final 120131
- FEATURE: Implemented API for ``MarginRule`` objects inside ``CSSPageRule``, see http://www.w3.org/TR/css3-page/. You can also use e.g. ``CSSPageRule['@top-left']`` to retrieve the MarginRule it it is set etc. All dict like methods should be there. If a margin is set twice or more all properties are merged into a single margin rule. Double set properties are all kept though (see below).
- FEATURE: ``parseStyle()`` has optional parameter ``validate=False`` now too to disable validation (default is always ``True``).
- FEATURE: ``CSSStyleDeclaration.setProperty`` has new option ``replace=True``. if True (DEFAULT) the given property will replace a present property. If False a new property will be added always. The difference to `normalize` is that two or more properties with the same name may be set, useful for e.g. stuff like::
background: red;
background: rgba(255, 0, 0, 0.5);
which defines the same property but only capable UAs use the last property value, older ones use the first value.
+ CHANGE: @rules attribute ``atkeyword`` value is now normalized. The actual keyword (example ``@IMPorT``) is kept and is optionally reserialized but in the example ``atkeyword == '@import'``
- BUGFIX: 'auto' is now an invalid CSSPageRule pagename.
- BUGFIX: Fixed issue for GoogleAppEngine (GAE) which somehow handles codecs differently. ``parseUrl`` should work now.
0.9.8
-----
0.9.8 final 111210
- FEATURE: Feature Request (#4) to be able to disable validation of a stylesheet has been implemented. Add Parameter ``validate=False`` for parsing.
+ BUGFIX: Fixed #5 Unicode escaping inside strings. Thanks to Simon Sapin
+ BUGFIX: The integer is optional in counter-reset and counter-increment, and not only on the first counter. Thanks to Simon Sapin
+ BUGFIX: Fix for unicode replacements by Denis Bilenko, thanks! https://bitbucket.org/cthedot/cssutils/pull-request/1/fix-a-bug-in-regex-which-accidentally
- IMPROVEMENT: ``parseStyle`` moved to CSSParser, thanks to Simon Sapin
0.9.8a3 110727
+ BUGFIX: Fixed validation of ``size`` property (thanks to Simon Sapin)
+ BUGFIX: Fixed Issue #55 (thanks to Simon Sapin): `outline-color` property was missing from validation.
+ BUGFIX: Fixed resolution of encoding detection of a stylesheet which did not use @charset in certain circumstances (mainly when imported sheets use different encoding than importing one which should be quite rare actually).
- FEATURE: Added ``URIValue.absoluteUri`` (thanks to Simon Sapin)
- FEATURE: Issue #53 feature request: Added new Preference option ``cssutils.ser.prefs.indentClosingBrace``. Defines if closing brace of block is indented to match indentation of the block (default) oder match indentation of selector.
- FEATURE: Feature request: Added new Preference option ``cssutils.ser.prefs.omitLeadingZero``. Defines if values between -1 and 1 should omit the 0, like ``.5px``. Minified settings do this, else 0 is kept by default.
+ CHANGE (minor): Some error messages have slightly changed due to a simpler compatibility to Python 3. Problem are any ``u'...'`` texts inside error messages which now are simplified, some without and quotes. Changed are e.g. error messages by ``Property``.
- **IMPROVEMENT**: Python 3 support. At least the unittests run in Python 2.5, 2.6, 2.7, 3.2 and Jython 2.5.1 now. Both encutils (with support by Fredrik Hedman, thanks!) and cssutils (thanks to Jaraco) and the CSS codec (thanks to Walter Dörwald) seem to work with Python 3 (tested on Python 3.2.1 Win64). Tests use Mock instead of MiniMock now as former is available for Python 2.x and 3.x.
- **IMPROVEMENT**: Parsing of longer (and probably invalid) ``font`` or ``font-family`` values was *extremely* slow due to a very complex regex. This has been changed and parsing of specific stylesheets using these values should be much faster now. (``macros[Profiles.CSS_LEVEL_2]['font-family']`` is gone so if you used this in your own validation modules you need to check the source in `profiles.py`.)
- IMPROVEMENT: Fixed Issue #54 (thanks to Simon Sapin): Short hand like `#f80` color value object have correct red, green and blue property values now. Also ``hsl()`` and ``hsla()`` colors report (almost) correct values (due to rounding problems).
- **Source control has moved to bitbucket https://bitbucket.org/cthedot/cssutils**. Older Issues are currently still at Google Code, newer at Bitbucket. Please do not use Google Code for new issue reports anymore!
0.9.8a2 110611
- BUGFIX: Fixed Issue #59 which showed a rather strange problem with longer space separated lists of font-family values being so slow to actually stop parsing.
- BUGFIX/IMPROVEMENT: Fixed Issue #48. ``CSSParser.parseUrl()`` uses the defined fetcher of this parser *for the initial stylesheet* at url too and not just the imported sheets *from* this sheet.
- BUGFIX: Fixed Issue #50 which prevented cssutils parsing the acid2.css file correctly. Problem were selectors starting directly with ``[class]`` (an attribute selector).
+ **API CHANGE (major)**
(Known) named colors are parsed as ColorValue objects now. These are the 16 simple colors (black, white, etc) and `transparent` but not all Extended color keywords yet. Also changed ``ColorValue.type`` to ``Value.COLOR_VALUE``. ColorValue has additional properties ``red, green, blue, alpha`` and ``colorType`` which is one of IDENT, HASH or FUNCTION for now.
+ API CHANGE (minor)
Removed already DEPRECATED ``cssutils.parse`` and ``CSSParser.parse``. Use the more specific functions/methods ``parseFile parseString parseUrl`` instead.
Removed already DEPRECATED ``cssutils.log.setlog`` and ``.setloglevel``. Use ``.setLog`` and ``.setLevel`` instead.
Removed already DEPRECATED ``cssutils.ser.keepUnkownAtRules`` (note the typo). Use ``.keepUnknownAtRules`` instead.
- IMPROVEMENT: Added validation profiles for some properties from `CSS Backgrounds and Borders Module Level 3 <http://www.w3.org/TR/css3-background/>`__, `CSS3 Basic User Interface Module <http://www.w3.org/TR/css3-ui/#resize>`__, `CSS Text Level 3 <http://www.w3.org/TR/css3-text/>`__
mainly `cursor`, `outline`, `resize`, `box-shadow`, `text-shadow`
0.9.8a1 101212
+ **API CHANGE (major)**
replace CSSValue with PropertyValue, Value and other classes.
NEW CLASSES:
:class:`cssutils.css.PropertyValue`
replaces CSSValue and CSSValueList
- is iterable (iterates over all single Value objects which in soruce CSS might be separated by "," "/" or " "
- a comma separated list of IDENT values is no longer handled as a single String (e.g. ``Arial, sans-serif``)
:class:`cssutils.css.Value`
replaces CSSPrimitiveValue with separate ``value`` and ``type`` info (value is typed, so e.g. string for e.g. STRING, IDENT or URI values, int or float) and is base class for more specific values like:
:class:`cssutils.css.URIValue`
replaces CSSPrimitiveValue, additional attribute ``uri``
:class:`cssutils.css.DimensionValue`
replaces CSSPrimitiveValue, additional attribute ``dimension``
:class:`cssutils.css.ColorValue`
replaces CSSPrimitiveValue, additional attribute ``red``, ``green``, ``blue`` and ``alpha``
**TODO: Not yet complete, only rgb, rgba, hsl, hsla and has values use this object and color and alpha information no done yet!**
:class:`cssutils.css.CSSFunction`
replaces CSSPrimitiveValue function, not complete yet
also renamed ``ExpressionValue`` to :class:`cssutils.css.MSValue` with new API
- IMPROVEMENT/CHANGE: Validation of color values is tighter now. Values like ``hsl(1, 2, 3)`` do not validate as it must be ``hsl(1, 2%, 3%)``. This mostly effects HSL/A and RGB/A notation.
- **IMPROVEMENT**: New Value parsing and API accelerate parsing of style declarations which take about 20-30% less time now. Of course this depends on the complexity of your styles.
+ BUGFIX: fixes issue #41, #42, #45, #46
PropertyValue.value returns value without any comments now, else use PropertyValue.cssText
- FEATURE: ``cssutils.replaceUrls()`` accepts as first argument a `cssutils.css.CSSStyleSheet` but now also a
:class:`cssutils.css.CSSStyleDeclaration` object, so may be used like the following which is useful when you work with HTML style attributes::
>>> style = cssutils.parseStyle("background-image: url(1.png), url('2.png')")
>>> cssutils.replaceUrls(style, lambda url: 'prefix/'+url)
>>> print style.cssText
background-image: url(prefix/1.png), url(prefix/2.png)
(I omitted the validation error message as more than one background-image is not yet defined in the cssutils validator but does parse through without problems)
+ CHANGE: explicit `+` of any dimension, percentage of number value is kept now instead of being stripped as if put explicitly in the author SHOULD have meant something ;)
Diffstat (limited to 'textproc/py-cssutils')
-rw-r--r-- | textproc/py-cssutils/Makefile | 10 | ||||
-rw-r--r-- | textproc/py-cssutils/PLIST | 146 | ||||
-rw-r--r-- | textproc/py-cssutils/distinfo | 8 |
3 files changed, 157 insertions, 7 deletions
diff --git a/textproc/py-cssutils/Makefile b/textproc/py-cssutils/Makefile index 73b8157c92d..a7b1db0e445 100644 --- a/textproc/py-cssutils/Makefile +++ b/textproc/py-cssutils/Makefile @@ -1,7 +1,7 @@ -# $NetBSD: Makefile,v 1.4 2012/04/08 19:09:13 wiz Exp $ +# $NetBSD: Makefile,v 1.5 2012/05/05 15:20:07 gls Exp $ # -DISTNAME= cssutils-0.9.7 +DISTNAME= cssutils-0.9.9 PKGNAME= ${PYPKGPREFIX}-${DISTNAME} CATEGORIES= textproc python MASTER_SITES= http://cssutils.googlecode.com/files/ \ @@ -17,6 +17,12 @@ PKG_DESTDIR_SUPPORT= user-destdir USE_LANGUAGES= #none +REPLACE_INTERPRETER+= python +REPLACE.python.old= /usr/bin/env python +REPLACE.python.new= ${PYTHONBIN} +REPLACE_FILES.python= src/cssutils/*.py +REPLACE_FILES.python+= src/cssutils/scripts/*.py + # all files are group/others writable. post-extract: chmod -R go-w ${WRKSRC} diff --git a/textproc/py-cssutils/PLIST b/textproc/py-cssutils/PLIST index 9bb1edd7662..f76f4c66df1 100644 --- a/textproc/py-cssutils/PLIST +++ b/textproc/py-cssutils/PLIST @@ -1,4 +1,4 @@ -@comment $NetBSD: PLIST,v 1.1.1.1 2011/05/01 09:20:46 obache Exp $ +@comment $NetBSD: PLIST,v 1.2 2012/05/05 15:20:07 gls Exp $ bin/csscapture bin/csscombine bin/cssparse @@ -10,6 +10,12 @@ ${PYSITELIB}/${EGG_INFODIR}/top_level.txt ${PYSITELIB}/cssutils/__init__.py ${PYSITELIB}/cssutils/__init__.pyc ${PYSITELIB}/cssutils/__init__.pyo +${PYSITELIB}/cssutils/_codec2.py +${PYSITELIB}/cssutils/_codec2.pyc +${PYSITELIB}/cssutils/_codec2.pyo +${PYSITELIB}/cssutils/_codec3.py +${PYSITELIB}/cssutils/_codec3.pyc +${PYSITELIB}/cssutils/_codec3.pyo ${PYSITELIB}/cssutils/_fetch.py ${PYSITELIB}/cssutils/_fetch.pyc ${PYSITELIB}/cssutils/_fetch.pyo @@ -73,6 +79,9 @@ ${PYSITELIB}/cssutils/css/cssvariablesdeclaration.pyo ${PYSITELIB}/cssutils/css/cssvariablesrule.py ${PYSITELIB}/cssutils/css/cssvariablesrule.pyc ${PYSITELIB}/cssutils/css/cssvariablesrule.pyo +${PYSITELIB}/cssutils/css/marginrule.py +${PYSITELIB}/cssutils/css/marginrule.pyc +${PYSITELIB}/cssutils/css/marginrule.pyo ${PYSITELIB}/cssutils/css/property.py ${PYSITELIB}/cssutils/css/property.pyc ${PYSITELIB}/cssutils/css/property.pyo @@ -82,6 +91,9 @@ ${PYSITELIB}/cssutils/css/selector.pyo ${PYSITELIB}/cssutils/css/selectorlist.py ${PYSITELIB}/cssutils/css/selectorlist.pyc ${PYSITELIB}/cssutils/css/selectorlist.pyo +${PYSITELIB}/cssutils/css/value.py +${PYSITELIB}/cssutils/css/value.pyc +${PYSITELIB}/cssutils/css/value.pyo ${PYSITELIB}/cssutils/css2productions.py ${PYSITELIB}/cssutils/css2productions.pyc ${PYSITELIB}/cssutils/css2productions.pyo @@ -151,3 +163,135 @@ ${PYSITELIB}/cssutils/util.pyo ${PYSITELIB}/encutils/__init__.py ${PYSITELIB}/encutils/__init__.pyc ${PYSITELIB}/encutils/__init__.pyo +${PYSITELIB}/tests/__init__.py +${PYSITELIB}/tests/__init__.pyc +${PYSITELIB}/tests/__init__.pyo +${PYSITELIB}/tests/basetest.py +${PYSITELIB}/tests/basetest.pyc +${PYSITELIB}/tests/basetest.pyo +${PYSITELIB}/tests/test_codec.py +${PYSITELIB}/tests/test_codec.pyc +${PYSITELIB}/tests/test_codec.pyo +${PYSITELIB}/tests/test_csscharsetrule.py +${PYSITELIB}/tests/test_csscharsetrule.pyc +${PYSITELIB}/tests/test_csscharsetrule.pyo +${PYSITELIB}/tests/test_csscomment.py +${PYSITELIB}/tests/test_csscomment.pyc +${PYSITELIB}/tests/test_csscomment.pyo +${PYSITELIB}/tests/test_cssfontfacerule.py +${PYSITELIB}/tests/test_cssfontfacerule.pyc +${PYSITELIB}/tests/test_cssfontfacerule.pyo +${PYSITELIB}/tests/test_cssimportrule.py +${PYSITELIB}/tests/test_cssimportrule.pyc +${PYSITELIB}/tests/test_cssimportrule.pyo +${PYSITELIB}/tests/test_cssmediarule.py +${PYSITELIB}/tests/test_cssmediarule.pyc +${PYSITELIB}/tests/test_cssmediarule.pyo +${PYSITELIB}/tests/test_cssnamespacerule.py +${PYSITELIB}/tests/test_cssnamespacerule.pyc +${PYSITELIB}/tests/test_cssnamespacerule.pyo +${PYSITELIB}/tests/test_csspagerule.py +${PYSITELIB}/tests/test_csspagerule.pyc +${PYSITELIB}/tests/test_csspagerule.pyo +${PYSITELIB}/tests/test_cssproperties.py +${PYSITELIB}/tests/test_cssproperties.pyc +${PYSITELIB}/tests/test_cssproperties.pyo +${PYSITELIB}/tests/test_cssrule.py +${PYSITELIB}/tests/test_cssrule.pyc +${PYSITELIB}/tests/test_cssrule.pyo +${PYSITELIB}/tests/test_cssrulelist.py +${PYSITELIB}/tests/test_cssrulelist.pyc +${PYSITELIB}/tests/test_cssrulelist.pyo +${PYSITELIB}/tests/test_cssstyledeclaration.py +${PYSITELIB}/tests/test_cssstyledeclaration.pyc +${PYSITELIB}/tests/test_cssstyledeclaration.pyo +${PYSITELIB}/tests/test_cssstylerule.py +${PYSITELIB}/tests/test_cssstylerule.pyc +${PYSITELIB}/tests/test_cssstylerule.pyo +${PYSITELIB}/tests/test_cssstylesheet.py +${PYSITELIB}/tests/test_cssstylesheet.pyc +${PYSITELIB}/tests/test_cssstylesheet.pyo +${PYSITELIB}/tests/test_cssunknownrule.py +${PYSITELIB}/tests/test_cssunknownrule.pyc +${PYSITELIB}/tests/test_cssunknownrule.pyo +${PYSITELIB}/tests/test_cssutils.py +${PYSITELIB}/tests/test_cssutils.pyc +${PYSITELIB}/tests/test_cssutils.pyo +${PYSITELIB}/tests/test_cssutilsimport.py +${PYSITELIB}/tests/test_cssutilsimport.pyc +${PYSITELIB}/tests/test_cssutilsimport.pyo +${PYSITELIB}/tests/test_cssvalue.py +${PYSITELIB}/tests/test_cssvalue.pyc +${PYSITELIB}/tests/test_cssvalue.pyo +${PYSITELIB}/tests/test_cssvariablesdeclaration.py +${PYSITELIB}/tests/test_cssvariablesdeclaration.pyc +${PYSITELIB}/tests/test_cssvariablesdeclaration.pyo +${PYSITELIB}/tests/test_cssvariablesrule.py +${PYSITELIB}/tests/test_cssvariablesrule.pyc +${PYSITELIB}/tests/test_cssvariablesrule.pyo +${PYSITELIB}/tests/test_domimplementation.py +${PYSITELIB}/tests/test_domimplementation.pyc +${PYSITELIB}/tests/test_domimplementation.pyo +${PYSITELIB}/tests/test_encutils/__init__.py +${PYSITELIB}/tests/test_encutils/__init__.pyc +${PYSITELIB}/tests/test_encutils/__init__.pyo +${PYSITELIB}/tests/test_errorhandler.py +${PYSITELIB}/tests/test_errorhandler.pyc +${PYSITELIB}/tests/test_errorhandler.pyo +${PYSITELIB}/tests/test_helper.py +${PYSITELIB}/tests/test_helper.pyc +${PYSITELIB}/tests/test_helper.pyo +${PYSITELIB}/tests/test_marginrule.py +${PYSITELIB}/tests/test_marginrule.pyc +${PYSITELIB}/tests/test_marginrule.pyo +${PYSITELIB}/tests/test_medialist.py +${PYSITELIB}/tests/test_medialist.pyc +${PYSITELIB}/tests/test_medialist.pyo +${PYSITELIB}/tests/test_mediaquery.py +${PYSITELIB}/tests/test_mediaquery.pyc +${PYSITELIB}/tests/test_mediaquery.pyo +${PYSITELIB}/tests/test_parse.py +${PYSITELIB}/tests/test_parse.pyc +${PYSITELIB}/tests/test_parse.pyo +${PYSITELIB}/tests/test_prodparser.py +${PYSITELIB}/tests/test_prodparser.pyc +${PYSITELIB}/tests/test_prodparser.pyo +${PYSITELIB}/tests/test_profiles.py +${PYSITELIB}/tests/test_profiles.pyc +${PYSITELIB}/tests/test_profiles.pyo +${PYSITELIB}/tests/test_properties.py +${PYSITELIB}/tests/test_properties.pyc +${PYSITELIB}/tests/test_properties.pyo +${PYSITELIB}/tests/test_property.py +${PYSITELIB}/tests/test_property.pyc +${PYSITELIB}/tests/test_property.pyo +${PYSITELIB}/tests/test_scripts_csscombine.py +${PYSITELIB}/tests/test_scripts_csscombine.pyc +${PYSITELIB}/tests/test_scripts_csscombine.pyo +${PYSITELIB}/tests/test_selector.py +${PYSITELIB}/tests/test_selector.pyc +${PYSITELIB}/tests/test_selector.pyo +${PYSITELIB}/tests/test_selectorlist.py +${PYSITELIB}/tests/test_selectorlist.pyc +${PYSITELIB}/tests/test_selectorlist.pyo +${PYSITELIB}/tests/test_serialize.py +${PYSITELIB}/tests/test_serialize.pyc +${PYSITELIB}/tests/test_serialize.pyo +${PYSITELIB}/tests/test_settings.py +${PYSITELIB}/tests/test_settings.pyc +${PYSITELIB}/tests/test_settings.pyo +${PYSITELIB}/tests/test_stylesheet.py +${PYSITELIB}/tests/test_stylesheet.pyc +${PYSITELIB}/tests/test_stylesheet.pyo +${PYSITELIB}/tests/test_tokenize2.py +${PYSITELIB}/tests/test_tokenize2.pyc +${PYSITELIB}/tests/test_tokenize2.pyo +${PYSITELIB}/tests/test_util.py +${PYSITELIB}/tests/test_util.pyc +${PYSITELIB}/tests/test_util.pyo +${PYSITELIB}/tests/test_value.py +${PYSITELIB}/tests/test_value.pyc +${PYSITELIB}/tests/test_value.pyo +${PYSITELIB}/tests/test_x.py +${PYSITELIB}/tests/test_x.pyc +${PYSITELIB}/tests/test_x.pyo diff --git a/textproc/py-cssutils/distinfo b/textproc/py-cssutils/distinfo index 820a92fd7aa..4d871059433 100644 --- a/textproc/py-cssutils/distinfo +++ b/textproc/py-cssutils/distinfo @@ -1,5 +1,5 @@ -$NetBSD: distinfo,v 1.1.1.1 2011/05/01 09:20:46 obache Exp $ +$NetBSD: distinfo,v 1.2 2012/05/05 15:20:07 gls Exp $ -SHA1 (cssutils-0.9.7.zip) = 95a25352ab067c7b13aa82c5f6a5408cf82a2678 -RMD160 (cssutils-0.9.7.zip) = 6119363eb9b8e38188cb8943c59d6d345681b227 -Size (cssutils-0.9.7.zip) = 447664 bytes +SHA1 (cssutils-0.9.9.zip) = ac8d4ff2e56d7e4d4a37c6c1944cbdd5fdffabaa +RMD160 (cssutils-0.9.9.zip) = 0affdb2edc523e4f22d54d7a92ce81bccbeb76a6 +Size (cssutils-0.9.9.zip) = 426449 bytes |