> https://docs.python.org/3/library/xml.etree.elementtree.html#xml.etree.ElementTree.ElementTree.write
>
> The argument was added in Python 3.4. Presumably, lxml implemented the
> API before this change.
>
> Maybe this would be considered a bug by lxml. Maybe it won't.
Maybe it is not a bug, just
On 2017-09-22 14:29, Nagy László Zsolt wrote:
>
>> Result:
>>
>> Traceback (most recent call last):
>> File "C:/not_telling/c14n.py", line 16, in
>> short_empty_elements=False
>> File "lxml.etree.pyx", line 1869, in lxml.etree._ElementTree.write
>> (src\lxml\lxml.etree.c:57004)
>>
> Result:
>
> Traceback (most recent call last):
> File "C:/not_telling/c14n.py", line 16, in
> short_empty_elements=False
> File "lxml.etree.pyx", line 1869, in lxml.etree._ElementTree.write
> (src\lxml\lxml.etree.c:57004)
> TypeError: write() got an unexpected keyword argument
Here is an MWE:
import io
from lxml import etree
test_node = etree.fromstring('''
http://schemas.xmlsoap.org/soap/envelope/;
xmlns:ns1="http://docs.oasis-open.org/ws-sx/ws-trust/200512;>
''')
output = io.BytesIO(b'')
test_node.getroottree().write(output,