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

2021-07-19 Thread Stefan Behnel
Stefan Behnel added the comment: The obvious work-around is to not use a default namespace. The result is just a visual difference, not a semantic one. If someone wants to continue with the existing PR, I'll try to free some time to review any improvements. -- versions: +Python 3.10

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

2021-07-19 Thread Daan Luttik
Daan Luttik added the comment: Is there any workaround for this? this bug still seems to be present in python 3.9.6. -- nosy: +dtluttik versions: +Python 3.9 -Python 2.7, Python 3.2, Python 3.3, Python 3.4, Python 3.5 ___ Python tracker

[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: https://mail

[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 ___ ___ Py

[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 ___ ___ Python-bugs-list

[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: https://ma

[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 pre

[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: https://mail.pyth

[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 ___ ___ Python-bugs-list

[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 : -- nosy: +vadmium ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.pytho

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

2014-04-13 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(""" ... http://www.w3.org/2000/svg"; version="1.1"> ... ... ... """)) >>>

[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 = ET.Element("{http:

[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 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/

[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-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 _

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

2013-12-14 Thread Stefan Behnel
Changes by Stefan Behnel : -- nosy: +eli.bendersky, scoder ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http

[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 fix

[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: http://www.w3.org/TR