Changeset 3463:73fa11056ad3 in livinglogic.python.xist

Show
Ignore:
Timestamp:
07/08/08 12:36:50 (11 years ago)
Author:
Walter Doerwald <walter@…>
Branch:
default
Message:

Bump cssutils version to 0.9.5b3 and fix regressions. Fix regressions from the new default parser.

Files:
8 modified

Legend:

Unmodified
Added
Removed
  • NEWS.rst

    r3377 r3463  
    22------------------------------------ 
    33 
    4 *   XIST has gained its fourth templating language: ``ULL`` the 
     4*   XIST has gained its fourth templating language: ``UL4`` the 
    55    "Universal Layout Language". This templating language is similar in 
    6     capabilities to `Django's templating language`__. However ``ULL`` templates 
     6    capabilities to `Django's templating language`__. However ``UL4`` templates 
    77    are compiled to a bytecode format, which makes it possible to implement 
    88    template renderers in other languages and makes the template code "secure" 
     
    1414    :class:`GUnzipAction`, :class:`CallFuncAction`,  :class:`CallMethAction`, 
    1515    :class:`ULLCompileAction`, :class:`ULLDumpAction` and :class:`ULLLoadAction`. 
     16 
     17*   The version number for :mod:`cssutils` has beedn bumped to 0.9.5b3. 
    1618 
    1719*   All actions in :mod:`ll.make` no longer check whether their inputs are 
  • setup.py

    r3425 r3463  
    247247    ], 
    248248    install_requires=[ 
    249         "cssutils == 0.9.5b2", 
     249        "cssutils == 0.9.5b3", 
    250250    ], 
    251251    namespace_packages=["ll"], 
  • src/ll/xist/css.py

    r3417 r3463  
    2424else: 
    2525    import logging 
    26     cssutils.log.setLevel(logging.FATAL) 
     26    cssutils.log.setloglevel(logging.FATAL) 
    2727 
    2828from ll import misc, url 
     
    205205                    for prop in style.seq: 
    206206                        if not isinstance(prop, css.CSSComment): 
    207                             styles[prop.name] = (count, prop.name, prop.cssValue.cssText) 
     207                            styles[prop.value.name] = (count, prop.value.cssText) 
    208208                            count += 1 
    209             style = " ".join("%s: %s;" % (name, value) for (count, name, value) in sorted(styles.itervalues())) 
     209            style = " ".join("%s;" % value for (count, value) in sorted(styles.itervalues())) 
    210210            if style: 
    211211                path[-1].attrs["style"] = style 
  • src/ll/xist/ns/doc.py

    r3263 r3463  
    7373        return rest.fromstring(text, base=base) 
    7474    elif lformat == "xist": 
    75         node = parsers.parsestring(text, base=base, prefixes=xsc.docprefixes()) 
     75        node = parsers.parsestring(text, base=base, prefixes=xsc.docprefixes(), parser=parsers.SGMLOPParser()) 
    7676        if not node[p]: # optimization: one paragraph docstrings don't need a <p> element. 
    7777            node = p(node) 
  • src/ll/xist/scripts/dtd2xsc.py

    r3263 r3463  
    149149    for entname in ents: 
    150150        if entname not in ("quot", "apos", "gt", "lt", "amp"): 
    151             ent = parsers.parsestring(dtd.resolve_ge(entname).value) 
     151            ent = parsers.parsestring(dtd.resolve_ge(entname).value, parser=parsers.SGMLOPParser()) 
    152152            ns.content.append(xnd.CharRef(entname, codepoint=ord(unicode(ent[0])[0]))) 
    153153 
  • test/test_xist_parse.py

    r3263 r3463  
    241241def test_parsestringurl(): 
    242242    # Base URLs should end up in the location info of the resulting XML tree 
    243     node = parsers.parsestring("gurk") 
     243    node = parsers.parsestring("gurk", parser=parsers.SGMLOPParser()) 
    244244    assert str(node[0].startloc.url) == "STRING" 
    245245 
    246     node = parsers.parsestring("gurk", base="root:gurk.xmlxsc") 
     246    node = parsers.parsestring("gurk", base="root:gurk.xmlxsc", parser=parsers.SGMLOPParser()) 
    247247    assert str(node[0].startloc.url) == "root:gurk.xmlxsc" 
    248248 
  • test/test_xist_url.py

    r3263 r3463  
    1818 
    1919def test_url(): 
    20     node = parsers.parsestring("<?url root:images/gurk.gif?>") 
     20    node = parsers.parsestring("<?url root:images/gurk.gif?>", parser=parsers.SGMLOPParser()) 
    2121    assert node.bytes(base="root:about/us.html") == "../images/gurk.gif" 
    2222 
  • test/test_xist_xfind.py

    r3263 r3463  
    265265 
    266266def test_frag(): 
    267     e = parsers.parsestring("das ist <b>klaus</b>. das ist <b>erich</b>", prefixes={None: html}) 
     267    e = parsers.parsestring("das ist <b>klaus</b>. das ist <b>erich</b>", parser=parsers.SGMLOPParser(), prefixes={None: html}) 
    268268    assert u"".join(map(unicode, e.walknode(e//html.b))) == u"klauserich" 
    269269