[issue17088] ElementTree incorrectly refuses to write attributes without namespaces when default_namespace is used

2021-06-20 Thread Carl Schaefer
Change by Carl Schaefer : -- nosy: +carlschaefer ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue17088] ElementTree incorrectly refuses to write attributes without namespaces when default_namespace is used

2020-04-04 Thread Márton Marczell
Márton Marczell added the comment: Can he please get a review of the pull request? -- nosy: +marczellm ___ Python tracker ___ ___

[issue17088] ElementTree incorrectly refuses to write attributes without namespaces when default_namespace is used

2019-10-07 Thread Maarten ter Huurne
Maarten ter Huurne added the comment: Can I please get a review of the pull request? -- ___ Python tracker ___ ___

[issue17088] ElementTree incorrectly refuses to write attributes without namespaces when default_namespace is used

2018-12-09 Thread Maarten ter Huurne
Maarten ter Huurne added the comment: I think I have a good solution now, see the pull request for details. It does touch a lot of code, but I split all the changes into small consistent units, so it should be easier to verify whether they are correct. --

[issue17088] ElementTree incorrectly refuses to write attributes without namespaces when default_namespace is used

2018-12-09 Thread Maarten ter Huurne
Change by Maarten ter Huurne : -- pull_requests: +10286 stage: -> patch review ___ Python tracker ___ ___ Python-bugs-list mailing

[issue17088] ElementTree incorrectly refuses to write attributes without namespaces when default_namespace is used

2018-12-08 Thread Raymond Hettinger
Change by Raymond Hettinger : -- nosy: +rhettinger ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue17088] ElementTree incorrectly refuses to write attributes without namespaces when default_namespace is used

2018-12-08 Thread Maarten ter Huurne
Maarten ter Huurne added the comment: I was working on what I thought would be an elegant solution to this problem: for non-qualified attributes, add the element's namespace before accessing the cache and strip the namespace prefix after accessing the cache if it's equal to the element's

[issue17088] ElementTree incorrectly refuses to write attributes without namespaces when default_namespace is used

2018-11-23 Thread Роман Донченко
Change by Роман Донченко : -- nosy: +SpecLad ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue17088] ElementTree incorrectly refuses to write attributes without namespaces when default_namespace is used

2017-10-11 Thread Rafael Ascensao
Rafael Ascensao added the comment: what's the status on this? -- nosy: +Rafael Ascensao ___ Python tracker ___

[issue17088] ElementTree incorrectly refuses to write attributes without namespaces when default_namespace is used

2016-03-14 Thread Garrett Birkel
Garrett Birkel added the comment: Just hit up against this namespace bug. Has this patch been abandoned?? -- nosy: +Garrett Birkel ___ Python tracker ___

[issue17088] ElementTree incorrectly refuses to write attributes without namespaces when default_namespace is used

2015-01-25 Thread Martin Panter
Changes by Martin Panter vadmium...@gmail.com: -- nosy: +vadmium ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17088 ___ ___ Python-bugs-list

[issue17088] ElementTree incorrectly refuses to write attributes without namespaces when default_namespace is used

2014-04-14 Thread Stefan Behnel
Stefan Behnel added the comment: @gene_wood: that's unrelated. This ticket is about attributes being rejected incorrectly. Fixing the example of the OP: from xml.etree.ElementTree import * svg = ElementTree(XML( ... svg width=12cm height=4cm viewBox=0 0 1200 400

[issue17088] ElementTree incorrectly refuses to write attributes without namespaces when default_namespace is used

2014-04-13 Thread Gene Wood
Gene Wood added the comment: One workaround to this is described here : http://stackoverflow.com/a/4999510/168874 It involves prefixing all of the elements with the namespace like this : from xml.etree import ElementTree as ET # build a tree structure root =

[issue17088] ElementTree incorrectly refuses to write attributes without namespaces when default_namespace is used

2014-01-27 Thread Wim
Wim added the comment: Ping -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17088 ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue17088] ElementTree incorrectly refuses to write attributes without namespaces when default_namespace is used

2013-12-14 Thread Stefan Behnel
Changes by Stefan Behnel sco...@users.sourceforge.net: -- nosy: +eli.bendersky, scoder ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17088 ___ ___

[issue17088] ElementTree incorrectly refuses to write attributes without namespaces when default_namespace is used

2013-12-14 Thread Stefan Behnel
Stefan Behnel added the comment: Note that the option is called default_namespace, not default_namespace_prefix. Could you try passing the namespace URI instead? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17088

[issue17088] ElementTree incorrectly refuses to write attributes without namespaces when default_namespace is used

2013-12-14 Thread Wim
Wim added the comment: Yes, the problem occurs regardless of whether the default_namespace parameter is the correct SVG namespace URI --- it's the fact of requesting a default namespace at all that exposes the bug. -- ___ Python tracker

[issue17088] ElementTree incorrectly refuses to write attributes without namespaces when default_namespace is used

2013-12-13 Thread Wim
Wim added the comment: Here's an improved patch (and improved testcase). It's a little more intrusive than the last patch because when a default namespace is being used, two distinct qname caches must be made. -- Added file: http://bugs.python.org/file33125/bug17088_2.patch

[issue17088] ElementTree incorrectly refuses to write attributes without namespaces when default_namespace is used

2013-12-12 Thread Wim
Wim added the comment: FWIW: I noticed that my patch has a bug due to sharing the cache dict between element names and attribute names, although I think this is unlikely to crop up very often in practice. I'll submit a better patch if/when I get the time to put one together. --

[issue17088] ElementTree incorrectly refuses to write attributes without namespaces when default_namespace is used

2013-12-05 Thread Wim
Wim added the comment: I have run into this a few times although it is only recently that I've convinced myself I understood the XML namespace spec well enough to know what the right behavior was. (I came to the same interpretation as silverbacknet.) I have attached a patch which I believe

[issue17088] ElementTree incorrectly refuses to write attributes without namespaces when default_namespace is used

2013-01-30 Thread Silverback Networks
New submission from Silverback Networks: ET reads a default-namespaced (xmnls=whatever) file correctly but won't write it back out. The error given is: ValueError: cannot use non-qualified names with default_namespace option The XML reference is reasonably clear on this: