[issue14377] Modify serializer for xml.etree.ElementTree to allow forcing the use of long tag closing

2013-01-13 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Patch updated (tostring() and tostringlist() refet to write() about short_empty_elements parameter). Perhaps descriptions of encoding and method parameters should not be repeated too? Why do you force short_empty_elements to be keyword only? Because

[issue14377] Modify serializer for xml.etree.ElementTree to allow forcing the use of long tag closing

2013-01-13 Thread Roundup Robot
Roundup Robot added the comment: New changeset 58168d69b496 by Eli Bendersky in branch 'default': Close #14377: Add a new parameter to ElementTree.write and some module-level http://hg.python.org/cpython/rev/58168d69b496 -- nosy: +python-dev resolution: - fixed stage: patch review -

[issue14377] Modify serializer for xml.etree.ElementTree to allow forcing the use of long tag closing

2013-01-13 Thread Éric Araujo
Éric Araujo added the comment: I don’t think a space before the slash should be added. (It was common in the days of XHTML 1 because of an SGML parsing hack.) -- nosy: +eric.araujo ___ Python tracker rep...@bugs.python.org

[issue14377] Modify serializer for xml.etree.ElementTree to allow forcing the use of long tag closing

2013-01-13 Thread Eli Bendersky
Eli Bendersky added the comment: On Sun, Jan 13, 2013 at 6:09 AM, Éric Araujo rep...@bugs.python.org wrote: Éric Araujo added the comment: I don’t think a space before the slash should be added. (It was common in the days of XHTML 1 because of an SGML parsing hack.) Ok, will fix.

[issue14377] Modify serializer for xml.etree.ElementTree to allow forcing the use of long tag closing

2013-01-13 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: I think Éric means different spaces, spaces in empty tags (empty / vs empty/). I don't know what the standard says about this. It should a separated issue. As for line continuations in docs, in all cases where they are occurred, a space used before a

[issue14377] Modify serializer for xml.etree.ElementTree to allow forcing the use of long tag closing

2013-01-13 Thread Eli Bendersky
Eli Bendersky added the comment: OK, thanks. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14377 ___ ___ Python-bugs-list mailing list

[issue14377] Modify serializer for xml.etree.ElementTree to allow forcing the use of long tag closing

2013-01-10 Thread Eli Bendersky
Eli Bendersky added the comment: Ariel, are you interested in pursuing this issue? Serhiy, I see you assigned this to yourself - would you like to submit a patch? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14377

[issue14377] Modify serializer for xml.etree.ElementTree to allow forcing the use of long tag closing

2013-01-10 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Serhiy, I see you assigned this to yourself - would you like to submit a patch? Not right now. This is low priority for me too. But I want to see this feature in 3.4. -- ___ Python tracker

[issue14377] Modify serializer for xml.etree.ElementTree to allow forcing the use of long tag closing

2013-01-10 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Well, here is a patch which add short_empty_elements flag (as for XMLGenerator) to write(), tostring() and tostringlist() methods of ElementTree. -- stage: needs patch - patch review ___ Python tracker

[issue14377] Modify serializer for xml.etree.ElementTree to allow forcing the use of long tag closing

2013-01-10 Thread Serhiy Storchaka
Changes by Serhiy Storchaka storch...@gmail.com: Added file: http://bugs.python.org/file28678/etree_short_empty_elements.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14377 ___

[issue14377] Modify serializer for xml.etree.ElementTree to allow forcing the use of long tag closing

2013-01-07 Thread Serhiy Storchaka
Changes by Serhiy Storchaka storch...@gmail.com: -- assignee: - serhiy.storchaka ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14377 ___ ___

[issue14377] Modify serializer for xml.etree.ElementTree to allow forcing the use of long tag closing

2012-11-04 Thread Serhiy Storchaka
Changes by Serhiy Storchaka storch...@gmail.com: -- stage: patch review - needs patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14377 ___ ___

[issue14377] Modify serializer for xml.etree.ElementTree to allow forcing the use of long tag closing

2012-07-05 Thread Eli Bendersky
Eli Bendersky eli...@gmail.com added the comment: I see no harm in modifying the signature of the private _serialize_* functions to accept another argument or dict of options. -- ___ Python tracker rep...@bugs.python.org

[issue14377] Modify serializer for xml.etree.ElementTree to allow forcing the use of long tag closing

2012-06-15 Thread Serhiy Storchaka
Serhiy Storchaka storch...@gmail.com added the comment: xml.sax.saxutils.XMLGenerator constructor has a parameter short_empty_elements (False by default). For consistency new ElementTree.write parameter must have the same name (True by default for compatibility). --

[issue14377] Modify serializer for xml.etree.ElementTree to allow forcing the use of long tag closing

2012-06-15 Thread Ariel Poliak
Ariel Poliak apol...@gmail.com added the comment: Ideally, this would be taken care by the _serialize_xml() with a parameter specified when called from within write(). However, the signature for the _serialize_xml() function cannot be changed, as it needs to match the signature for the rest

[issue14377] Modify serializer for xml.etree.ElementTree to allow forcing the use of long tag closing

2012-06-14 Thread Serhiy Storchaka
Changes by Serhiy Storchaka storch...@gmail.com: Added file: http://bugs.python.org/file26010/ElementTree-force_long_tags-v3.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14377 ___

[issue14377] Modify serializer for xml.etree.ElementTree to allow forcing the use of long tag closing

2012-06-14 Thread Serhiy Storchaka
Serhiy Storchaka storch...@gmail.com added the comment: I don't think that the three new fields in each Element is a suitable price for this very rare used feature. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14377

[issue14377] Modify serializer for xml.etree.ElementTree to allow forcing the use of long tag closing

2012-06-14 Thread Eli Bendersky
Eli Bendersky eli...@gmail.com added the comment: Agree with Serhiy. Why are these flags required in Element? Also, I'm moving this to 3.4 since the patch came too late in the 3.3 process - the first beta is very soon, after which we prefer not to add new features. -- priority: normal

[issue14377] Modify serializer for xml.etree.ElementTree to allow forcing the use of long tag closing

2012-06-12 Thread Ariel Poliak
Ariel Poliak apol...@gmail.com added the comment: Made a new patch. This one contains changes for xml.etree.ElementTree for cpython, jython, and stackless. It also contains changes to Modules/_elementtree.c for cpython and stackless. The changes within this patch do not change the signature

[issue14377] Modify serializer for xml.etree.ElementTree to allow forcing the use of long tag closing

2012-06-08 Thread Eli Bendersky
Eli Bendersky eli...@gmail.com added the comment: Any progress, or can this issue be closed? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14377 ___

[issue14377] Modify serializer for xml.etree.ElementTree to allow forcing the use of long tag closing

2012-03-23 Thread Eli Bendersky
Eli Bendersky eli...@gmail.com added the comment: Hello, thanks for the patch! Since this is a new feature, I suggest discussion it on the python-ideas list first. Next, as for your patch: 1. What is ElementTree_new.py? 2. Note that new features have to be added to in-development versions of

[issue14377] Modify serializer for xml.etree.ElementTree to allow forcing the use of long tag closing

2012-03-23 Thread Ariel Poliak
Ariel Poliak apol...@gmail.com added the comment: To answer eli.bendersky's questions: 1. That's just the name of the file with my changes in it. I pulled the original file from Hg, copied it to ElementTree_new.py, made my changes, and created a patch from the two. 2. I'm not very familiar

[issue14377] Modify serializer for xml.etree.ElementTree to allow forcing the use of long tag closing

2012-03-21 Thread Serhiy Storchaka
Serhiy Storchaka storch...@gmail.com added the comment: -if long_xml or text or len(elem): +if text or len(elem) or long_xml: Use alternatives in order of decreasing probability. -- nosy: +storchaka ___ Python tracker

[issue14377] Modify serializer for xml.etree.ElementTree to allow forcing the use of long tag closing

2012-03-21 Thread Ned Deily
Changes by Ned Deily n...@acm.org: -- nosy: +eli.bendersky ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14377 ___ ___ Python-bugs-list mailing

[issue14377] Modify serializer for xml.etree.ElementTree to allow forcing the use of long tag closing

2012-03-20 Thread Ariel Poliak
New submission from Ariel Poliak apol...@gmail.com: As it stands in Hg, when the write() method of an xml.etree.ElementTree object is called, and a tag within the XML tree has no child tags or defined text, the tag is written using the short notation tag ... /. Whether or not the short