[issue45336] xml.etree.ElementTree.write does not support `standalone` option

2022-03-14 Thread Eric Vergnaud


Eric Vergnaud  added the comment:

Actually there are 2 distinct issues here:
 - ValueError: cannot use non-qualified names with default_namespace option
 - lack of 'standalone' option when writing XML PI

--

___
Python tracker 
<https://bugs.python.org/issue45336>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue45336] xml.etree.ElementTree.write does not support `standalone` option

2022-03-14 Thread Eric Vergnaud


Eric Vergnaud  added the comment:

lxml tostring does not support the default_namespace value so not an option

--

___
Python tracker 
<https://bugs.python.org/issue45336>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue45336] xml.etree.ElementTree.write does not support `standalone` option

2022-03-14 Thread Eric Vergnaud


Eric Vergnaud  added the comment:

This is not a feature request, it's a bug fix request, so should be fixed asap.

Why is it a bug ?
XML spec says that "the default namespace does not apply to attribute names" 
(see section 6.3), therefore having a simple attribute name when using a 
default namespace is a perfectly valid scenario.

Raising a ValueError in add_qname (line 864) is therefore incorrect if the 
qname being added is a simple name of an attribute

not sure if lxml is able to parse very large documents (>4g) but I'll try it

--
nosy: +ericvergnaud

___
Python tracker 
<https://bugs.python.org/issue45336>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com