[lxml-dev] lxml 2.0alpha6 released
Stefan Behnel
stefan_ml at behnel.de
Wed Dec 19 13:09:07 CET 2007
Hi,
another 'last' alpha version of the 2.0 series was released to PyPI. The
reason this is still not a beta version is that there were a couple of
signature changes in methods for iteration, XPath and XSLT to remove some
inconsistencies. I hope these do not cause too much hassle for maintainers of
existing code. Backwards compatibility is provided through the use of keyword
arguments (which are now enforced in some places where they make sense).
I'm open to discussion about these changes, but would otherwise declare this
release ready for the API freeze. From my point of view, the next release will
only focus on bug fixing (if required :) before the final release (hopefully
still this year).
This release already features some major bug fixes including a memory leak
that was introduced in 2.0alpha5 (by newer Cython versions). lxml now requires
the not-yet-released Cython 0.9.6.10 to build, which will hopefully contain
the bug fix.
One thing to improve for 2.0 is the documentation (as usual), especially the
generated API docs:
http://codespeak.net/lxml/dev/api/index.html
Any help is appreciated, as are bug reports and criticism.
Have fun,
Stefan
2.0alpha6 (2007-12-19)
======================
Features added
--------------
* New properties ``position`` and ``code`` on ParseError exception (as
in ET 1.3)
Bugs fixed
----------
* Memory leak in the ``parse()`` function.
* Minor bugs in XSLT error message formatting.
* Result document memory leak in target parser.
Other changes
-------------
* Various places in the XPath, XSLT and iteration APIs now require
keyword-only arguments.
* The argument order in ``element.itersiblings()`` was changed to
match the order used in all other iteration methods. The second
argument ('preceding') is now a keyword-only argument.
* The ``getiterator()`` method on Elements and ElementTrees was
reverted to return an iterator as it did in lxml 1.x. The ET API
specification allows it to return either a sequence or an iterator,
and it traditionally returned a sequence in ET and an iterator in
lxml. However, it is now deprecated in favour of the ``iter()``
method, which should be used in new code wherever possible.
* The 'pretty printed' serialisation of ElementTree objects now
inserts newlines at the root level between processing instructions,
comments and the root tag.
* A 'pretty printed' serialisation is now terminated with a newline.
* Second argument to ``lxml.etree.Extension()`` helper is no longer
required, third argument is now a keyword-only argument ``ns``.
* ``lxml.html.tostring`` takes an ``encoding`` argument.
More information about the lxml-dev
mailing list