[issue36233] xml ElementTree quotation marks of xml version string

2019-03-22 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- resolution: -> not a bug stage: -> resolved status: open -> closed ___ Python tracker ___ ___ Pyth

[issue36233] xml ElementTree quotation marks of xml version string

2019-03-22 Thread Stefan Behnel
Stefan Behnel added the comment: As a work-around, you can provide your own XML declaration (or not) and pass "xml_declaration=False" into ElementTree.write() to prevent it from adding one. UTF-8 encoded XML is ok without such a declaration. -- __

[issue36233] xml ElementTree quotation marks of xml version string

2019-03-22 Thread Stefan Behnel
Stefan Behnel added the comment: I concur with Serhiy that the bug is in OpenCV (or its parser project), and that it is best solved there. Otherwise, we would create a dependency on a future/recent Python version for exporting XML to it. -- ___ Py

[issue36233] xml ElementTree quotation marks of xml version string

2019-03-11 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Then report a bug to OpenCV. I do not think that changing quotation marks in the xml declaration will help much, since likely that parser has other flaws (for example what about using single quotes for attributes?). Changing quotation marks for sure will

[issue36233] xml ElementTree quotation marks of xml version string

2019-03-11 Thread Johann Krauter
Johann Krauter added the comment: The xml parser of OpenCV (3.4.5) in C++ is not able to load such xml file. -- ___ Python tracker ___

[issue36233] xml ElementTree quotation marks of xml version string

2019-03-08 Thread Stefan Behnel
Stefan Behnel added the comment: While I do understand the interest in a bit more visual consistency (and, lacking further input, I assume that this is the OP's "problem"), it really is at best a purely visual improvement with the potential to break code and/or tests out there. I'd rather no

[issue36233] xml ElementTree quotation marks of xml version string

2019-03-08 Thread Raymond Hettinger
Raymond Hettinger added the comment: +0 I support making this change, if only to keep the quoting convention consistent with how we quote attributes. Also, use of double quotes seems to be the norm. I made a brief informal survey of XML samples from multiple sources including DocBook, MS

[issue36233] xml ElementTree quotation marks of xml version string

2019-03-08 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Both quotes are valid. See https://www.w3.org/TR/2008/REC-xml-20081126/#sec-prolog-dtd. -- ___ Python tracker ___

[issue36233] xml ElementTree quotation marks of xml version string

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

[issue36233] xml ElementTree quotation marks of xml version string

2019-03-08 Thread Johann Krauter
New submission from Johann Krauter : I have the problem, that a xml file is save with the following xml declaration: instead of I would propose to change the line number 769 in the ElementTree.py to: write("\n" % ( declared_encoding,)) -- components: XML files