Re: xml: TypeError: write() got an unexpected keyword argument 'short_empty_elements'

2017-09-22 Thread Nagy László Zsolt
> 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

Re: xml: TypeError: write() got an unexpected keyword argument 'short_empty_elements'

2017-09-22 Thread Thomas Jollans
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) >>

Re: xml: TypeError: write() got an unexpected keyword argument 'short_empty_elements'

2017-09-22 Thread Nagy László Zsolt
> 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

xml: TypeError: write() got an unexpected keyword argument 'short_empty_elements'

2017-09-22 Thread Nagy László Zsolt
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,