[lxml-dev] lxml 2.1beta1 released
Stefan Behnel
stefan_ml at behnel.de
Tue Apr 15 21:07:10 CEST 2008
Hi all,
lxml 2.1beta1 is on PyPI. This is the first beta release of the upcoming 2.1
release series.
http://codespeak.net/lxml/dev/
http://pypi.python.org/pypi/lxml/2.1beta1
This release contains the bug fixes that were included in 2.0.4 as well as a
couple of other important fixes over 2.1alpha1. It also brings some new
features, some of which were long awaited - CDATA support was first requested
in December 2005, according to the mailing list archive. Another long awaited
feature, XSLT extension element support, was already released in 2.1alpha1.
Feedback on both will be appreciated.
I hope you like it.
Have fun,
Stefan
2.1beta1 (2008-04-15)
Features added
* Error logging in Schematron (requires libxml2 2.6.32 or later).
* Parser option strip_cdata for normalising or keeping CDATA sections.
Defaults to True as before, thus replacing CDATA sections by their text
content.
* CDATA() factory to wrap string content as CDATA section.
Bugs fixed
* Resolving to a filename in custom resolvers didn't work.
* lxml did not honour libxslt's second error state "STOPPED", which let
some XSLT errors pass silently.
* Memory leak in Schematron with libxml2 >= 2.6.31.
* lxml.etree accepted non well-formed namespace prefix names.
Other changes
* Major cleanup in internal moveNodeToDocument() function, which takes
care of namespace cleanup when moving elements between different
namespace contexts.
* New Elements created through the makeelement() method of an HTML parser
or through lxml.html now end up in a new HTML document (doctype HTML
4.01 Transitional) instead of a generic XML document. This mostly
impacts the serialisation and the availability of a DTD context.
2.1alpha1 (2008-03-27)
Features added
* New event types 'comment' and 'pi' in iterparse().
* XSLTAccessControl instances have a property options that returns a
dict of access configuration options.
* Constant instances DENY_ALL and DENY_WRITE on XSLTAccessControl class.
* Extension elements for XSLT (experimental!)
* Element.base property returns the xml:base or HTML base URL of an
Element.
* docinfo.URL property is writable.
Bugs fixed
* Default encoding for plain text serialisation was different from that
of XML serialisation (UTF-8 instead of ASCII).
Other changes
* Minor API speed-ups.
* The benchmark suite now uses tail text in the trees, which makes the
absolute numbers incomparable to previous results.
* Generating the HTML documentation now requires Pygments, which is used
to enable syntax highlighting for the doctest examples.
Most long-time deprecated functions and methods were removed:
* etree.clearErrorLog(), use
etree.clear_error_log()
* etree.useGlobalPythonLog(), use
etree.use_global_python_log()
* etree.ElementClassLookup.setFallback(), use
etree.ElementClassLookup.set_fallback()
* etree.getDefaultParser(), use
etree.get_default_parser()
* etree.setDefaultParser(), use
etree.set_default_parser()
* etree.setElementClassLookup(), use
etree.set_element_class_lookup()
Note that parser.setElementClassLookup() has not been removed yet,
although parser.set_element_class_lookup() should be used instead.
* xpath_evaluator.registerNamespace(), use
xpath_evaluator.register_namespace()
* xpath_evaluator.registerNamespaces(), use
xpath_evaluator.register_namespaces()
* objectify.setPytypeAttributeTag, use
objectify.set_pytype_attribute_tag
* objectify.setDefaultParser(), use
objectify.set_default_parser()
More information about the lxml-dev
mailing list