7 Commits

Author SHA1 Message Date
Cosimo Lupo
0c0d46e53b
etree: pretty_print is False by default (like in lxml) 2018-07-15 12:31:11 +01:00
Cosimo Lupo
6c6b94a580
etree: restrict py2 bytes to ASCII only 2018-07-14 20:06:22 +01:00
Cosimo Lupo
83e8da2206
etree: only write self-closing <tag/> when element.text is None
like lxml does
2018-07-14 17:58:44 +01:00
Cosimo Lupo
1a94fbc121
etree: in invalid xml chars allow surrogates for 'narrow' pythons 2018-07-14 14:31:52 +01:00
Cosimo Lupo
5f61bcfcb4
etree: simplify regex for invalid xml chars 2018-07-14 14:07:42 +01:00
Cosimo Lupo
eea1766d9a
etree: fix valid XML regex for narrow UCS-2 only pythons
fixes https://ci.appveyor.com/project/adrientetar/ufolib/build/1.0.489/job/epryi911juu5lqdl#L72
2018-07-14 13:41:19 +01:00
Cosimo Lupo
d87c4edfe1
ufoLib.etree: add shim module that exports ElementTree API
works with both lxml and xml.etree backends

adds some missing things from built-in etree, such as the ability to
use an OrderedDict for attributes, support for pretty_print argument
to add indentation, etc.
2018-07-13 18:44:11 +01:00