Opened 7 years ago
Closed 7 years ago
#12332 closed enhancement (fixed)
lxml-4.4.0 (python module)
| Reported by: | Bruce Dubbs | Owned by: | Bruce Dubbs |
|---|---|---|---|
| Priority: | normal | Milestone: | 9.0 |
| Component: | BOOK | Version: | SVN |
| Severity: | medium | Keywords: | |
| Cc: |
Description (last modified by )
New minor version.
Change History (4)
comment:1 by , 7 years ago
| Description: | modified (diff) |
|---|
comment:2 by , 7 years ago
| Owner: | changed from to |
|---|---|
| Status: | new → assigned |
comment:3 by , 7 years ago
Note:
See TracTickets
for help on using tickets.

lxml changelog
4.4.0 (2019-07-27)
Features added
Element.clear()accepts a new keyword argumentkeep_tail=Trueto clear everything but the tail text. This is helpful in some document-style use cases.lxml.objectifyimplement theindex()special method.nsmapproperty. Original patch by Jan Pazdziora.max_depthargument to prevent content explosion. It is limited to 6 by default.targetobject of the XMLParser can havestart_ns()andend_ns()callback methods to listen to namespace declarations.TreeBuilderhas new argumentscomment_factoryandpi_factoryto pass factories for creating comments and processing instructions, as well as flag argumentsinsert_commentsandinsert_pisto discard them from the tree when set to false.etree.canonicalize(), a correspondingC14NWriterTargetclass, and ac14n2serialisation method.Bugs fixed
commentandpievents initerwalk()were never triggered, and instead, comments and processing instructions in the tree were reported asstartelements. Also, when walking an ElementTree (as opposed to its root element), comments and PIs outside of the root element are now reported.rnc2rng.sourceandtrackwere added to the list of empty tags inlxml.html.defs.IOError.Other changes
Element.find*()with prefix-namespace mappings, the empty string is now accepted to define a default namespace, in addition to the previously supportedNoneprefix. Empty strings are more convenient since they keep all prefix keys in a namespace dict strings, which simplifies sorting etc.ElementTree.write_c14n()method has been deprecated in favour of the long preferredElementTree.write(f, method="c14n"). It will be removed in a future release.