lxml 1.0.2 and 1.1alpha released

Stefan Behnel stefan.behnel-n05pAM at web.de
Wed Jun 28 08:22:15 CEST 2006


Hi,

I'm happy to announce the release of lxml 1.0.2 and 1.1alpha. The changes are
listed below. As a brief introduction:

"""
lxml is a Pythonic binding for the libxml2 and libxslt libraries. It provides
safe and convenient access to these libraries using the ElementTree API. It
extends the ElementTree API significantly to offer support for XPath, RelaxNG,
XML Schema, XSLT, C14N and much, much more.

Its goals are:

    * Pythonic API.
    * Documented.
      http://codespeak.net/lxml/#documentation
      http://codespeak.net/lxml/FAQ.html
    * FAST!
      http://codespeak.net/lxml/performance.html
    * Use Python unicode strings in API.
    * Safe (no segfaults).
    * No manual memory management!
      (as opposed to the official libxml2 Python bindings)
"""

lxml 1.0.2 is a maintenance release for the stable and production-ready 1.0
series. Updating and upstream integration into distributions is recommended.

lxml 1.1alpha is a preview release which adds loads of new features, including
a SAX-like iterparse() function, multi-threading and advanced tree iteration.
Bug reports and success stories sent to the mailing list are appreciated.

The source as well as various eggs and installers are available from cheeseshop:

http://cheeseshop.python.org/pypi/lxml/1.0.2
http://cheeseshop.python.org/pypi/lxml/1.1alpha

Have fun,
Stefan


Changes in 1.0.2:

  Features added
    * Support for setting a custom default Element class as opposed to
      namespace specific classes (which still override the default class)
  Bugs fixed
    * Rare exceptions in Python list functions were not handled
    * Parsing accepted unicode strings with XML encoding declaration in
      certain cases
    * Parsing 8-bit encoded strings from StringIO objects raised an exception
    * Module function initThread() was removed - useless (and never worked)
    * XSLT and parser exception messages include the error line number

Features added in 1.1alpha:

    * Module level iterwalk() function as 'iterparse' for trees
    * ElementTree compatible iterparse() module function
    * Element.nsmap property returns a mapping of all namespace prefixes known
      at the Element to their namespace URI
    * Reentrant threading support in RelaxNG, XMLSchema and XSLT
    * Threading support in parsers and serializers:
          o All in-memory operations (tostring, parse(StringIO), etc.) free
            the GIL
          o File operations (on file names) free the GIL
          o Reading from file-like objects frees the GIL and reacquires it for
            reading
          o Serialisation to file-like objects is single-threaded (high lock
            overhead)
    * Element iteration over XPath axes:
          o Element.iterdescendants() iterates over the descendants of an
            element
          o Element.iterancestors() iterates over the ancestors of an element
            (from parent to parent)
          o Element.itersiblings() iterates over either the following or
            preceding siblings of an element
          o Element.iterchildren() iterates over the children of an element in
            either direction
          o All iterators support the tag keyword argument to restrict the
            generated elements
    * Element.getnext() and Element.getprevious() return the direct siblings
      of an element


More information about the Python-announce-list mailing list