Opened 6 years ago
Closed 6 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: | normal | Keywords: | |
Cc: |
Description (last modified by ) ¶
New minor version.
Change History (4)
comment:1 by , 6 years ago
Description: | modified (diff) |
---|
comment:2 by , 6 years ago
Owner: | changed from | to
---|---|
Status: | new → assigned |
comment:3 by , 6 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 argument
keep_tail=True
to clear everything but the tail text. This is helpful in some document-style use cases.
lxml.objectify
implement the
index()
special method.
nsmap
property. Original patch by Jan Pazdziora.
max_depth
argument to prevent content explosion. It is limited to 6 by default.
target
object of the XMLParser can have
start_ns()
and
end_ns()
callback methods to listen to namespace declarations.
TreeBuilder
has new arguments
comment_factory
and
pi_factory
to pass factories for creating comments and processing instructions, as well as flag arguments
insert_comments
and
insert_pis
to discard them from the tree when set to false.
etree.canonicalize()
, a corresponding
C14NWriterTarget
class, and a
c14n2
serialisation method.
Bugs fixed
comment
and
pi
events in
iterwalk()
were never triggered, and instead, comments and processing instructions in the tree were reported as
start
elements. Also, when walking an ElementTree (as opposed to its root element), comments and PIs outside of the root element are now reported.
rnc2rng
.
source
and
track
were added to the list of empty tags in
lxml.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 supported
None
prefix. 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 preferred
ElementTree.write(f, method="c14n")
. It will be removed in a future release.