[issue36227] Add default_namespace argument to xml.etree.ElementTree.tostring()

2019-04-14 Thread Stefan Behnel
Stefan Behnel added the comment: Thank you for you contribution. -- components: +XML resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker

[issue36227] Add default_namespace argument to xml.etree.ElementTree.tostring()

2019-04-14 Thread Stefan Behnel
Stefan Behnel added the comment: New changeset ffca16e25a70fd44a87b13b379b5ec0c7a11e926 by Stefan Behnel (Bernt Røskar Brenna) in branch 'master': bpo-36227: ElementTree.tostring() default_namespace and xml_declaration arguments (GH-12225)

[issue36227] Add default_namespace argument to xml.etree.ElementTree.tostring()

2019-03-08 Thread Bernt Røskar Brenna
Bernt Røskar Brenna added the comment: I pushed changes to the PR. I also added xml_declaration and default_namespace to the tostringlist() method. -- ___ Python tracker ___

[issue36227] Add default_namespace argument to xml.etree.ElementTree.tostring()

2019-03-08 Thread Bernt Røskar Brenna
Bernt Røskar Brenna added the comment: I will add xml_declaration and push to the existing PR. -- ___ Python tracker ___ ___

[issue36227] Add default_namespace argument to xml.etree.ElementTree.tostring()

2019-03-08 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Okay. Bernt, do you mind to add also the xml_declaration option in PR 12225 or create a separate PR for issue31256? -- ___ Python tracker

[issue36227] Add default_namespace argument to xml.etree.ElementTree.tostring()

2019-03-08 Thread Stefan Behnel
Stefan Behnel added the comment: lxml does not support the "default_namespace" option specifically (because its tree model preserves namespace prefixes), but it generally makes all (justifiable) serialisation options available to both tostring() and ET.write(). I think the same should apply

[issue36227] Add default_namespace argument to xml.etree.ElementTree.tostring()

2019-03-08 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: See also issue31256. I do not know what is better: make tostring() to accept all options of write(), or keep it simpler. What strategy lxml supports? -- ___ Python tracker

[issue36227] Add default_namespace argument to xml.etree.ElementTree.tostring()

2019-03-08 Thread Stefan Behnel
Stefan Behnel added the comment: The feature seems reasonable to me and the patch looks good. -- ___ Python tracker ___ ___

[issue36227] Add default_namespace argument to xml.etree.ElementTree.tostring()

2019-03-07 Thread Karthikeyan Singaravelan
Change by Karthikeyan Singaravelan : -- nosy: +eli.bendersky, scoder, serhiy.storchaka ___ Python tracker ___ ___ Python-bugs-list

[issue36227] Add default_namespace argument to xml.etree.ElementTree.tostring()

2019-03-07 Thread Bernt Røskar Brenna
Change by Bernt Røskar Brenna : -- keywords: +patch pull_requests: +12215 stage: -> patch review ___ Python tracker ___ ___

[issue36227] Add default_namespace argument to xml.etree.ElementTree.tostring()

2019-03-07 Thread Bernt Røskar Brenna
New submission from Bernt Røskar Brenna : default_namespace is often used when serializing ET elements. tostring() is mainly a wrapper around ElementTree.write(), and it is therefore natural that it mirrors write's argument. tostring() already passes encoding, method and short_empty_elements