[issue8583] Hardcoded namespace_separator in the cElementTree.XMLParser

2019-04-27 Thread Stefan Behnel
Stefan Behnel added the comment: Closing as a duplicate of the more general issue 18304. -- resolution: -> duplicate stage: -> resolved status: open -> closed superseder: -> ElementTree -- provide a way to ignore namespace in tags and searches _

[issue8583] Hardcoded namespace_separator in the cElementTree.XMLParser

2015-02-10 Thread Martin Panter
Martin Panter added the comment: Also Issue 18304 for more discussion on simplifying namespaces -- nosy: +vadmium ___ Python tracker ___ __

[issue8583] Hardcoded namespace_separator in the cElementTree.XMLParser

2012-07-21 Thread Florent Xicluna
Florent Xicluna added the comment: See also issue 13378 which proposes custom namespace maps for serializing. -- components: +XML nosy: +eli.bendersky versions: +Python 3.4 -Python 3.2 ___ Python tracker __

[issue8583] Hardcoded namespace_separator in the cElementTree.XMLParser

2011-05-28 Thread library.engine
library.engine added the comment: What is so implicit in the passing of a list of undesired namespaces to the parse function? This is quite explicit, in my humble opinion, and it lets you not to repeat yourself for each and every tag you want to find in the tree, as well. --

[issue8583] Hardcoded namespace_separator in the cElementTree.XMLParser

2011-05-28 Thread Martin v . Löwis
Changes by Martin v. Löwis : -- Removed message: http://bugs.python.org/msg137107 ___ Python tracker ___ ___ Python-bugs-list mailing l

[issue8583] Hardcoded namespace_separator in the cElementTree.XMLParser

2011-05-28 Thread Martin v . Löwis
Martin v. Löwis added the comment: I recommend to revert this change. It seems that some users are opposed to any kind of folding (as my earlier folding experiment has demonstrated); users who *really* don't want to see the history would need to step forward and request a per-user option to s

[issue8583] Hardcoded namespace_separator in the cElementTree.XMLParser

2011-05-28 Thread Stefan Behnel
Stefan Behnel added the comment: I don't see this having much to do with the DRY principle. It's "explicit is better than implicit" and "better safe than sorry" that applies here. -- ___ Python tracker ___

[issue8583] Hardcoded namespace_separator in the cElementTree.XMLParser

2011-05-27 Thread library.engine
library.engine added the comment: I second request for tag names not prefixed with a root namespace in python, mostly because of ugly code, as performance degradation is negligible on relatively small files. But this ubiquitous repeating (even in the case if you're appending a variable to ever

[issue8583] Hardcoded namespace_separator in the cElementTree.XMLParser

2010-08-04 Thread Terry J. Reedy
Changes by Terry J. Reedy : -- type: performance -> feature request versions: +Python 3.2 -Python 2.5, Python 2.6, Python 2.7 ___ Python tracker ___ __

[issue8583] Hardcoded namespace_separator in the cElementTree.XMLParser

2010-05-02 Thread Dmitry Chichkov
Dmitry Chichkov added the comment: Interestingly in precisely these applications often you don't care about namespaces at all. Often all you need is to extract 'text' or 'name' elements irregardless of the namespace. -- ___ Python tracker

[issue8583] Hardcoded namespace_separator in the cElementTree.XMLParser

2010-05-02 Thread Dmitry Chichkov
Dmitry Chichkov added the comment: I agree that the argument name choice is poor. But it have already been made by whoever coded the EXPAT parser which cElementTree.XMLParser wraps. So there is not much room here. As to 'proposed feature have to be used with great care by users' - this s alr

[issue8583] Hardcoded namespace_separator in the cElementTree.XMLParser

2010-05-02 Thread Stefan Behnel
Stefan Behnel added the comment: There is at least one valid use case: code that needs to deal with HTML and XHTML currently has to normalise the tag names in some way, which usually means that it will want to remove the namespaces from XHTML documents to make it look like plain HTML. It woul

[issue8583] Hardcoded namespace_separator in the cElementTree.XMLParser

2010-05-01 Thread Dmitry Chichkov
Dmitry Chichkov added the comment: This patch does not modify the existing behavior of the library. The namespace_separator parameter is optional. Parameter already exists in the EXPAT library, but it is hard coded in the cElementTree.XMLParser code. Fredrik, yes, namespaces are a fundamental

[issue8583] Hardcoded namespace_separator in the cElementTree.XMLParser

2010-05-01 Thread Fredrik Lundh
Fredrik Lundh added the comment: Namespaces are a fundamental part of the XML information model (both xpath and infoset) and all modern XML document formats, so I'm not sure what problem you're trying to solve by pretending that they don't exist. It's a bit like modifying "import foo" to work

[issue8583] Hardcoded namespace_separator in the cElementTree.XMLParser

2010-04-30 Thread Dmitry Chichkov
Dmitry Chichkov added the comment: And obviously iterparse can be either overridden in the local user code or patched in the library. Here's the iterparse code/test code: import cElementTree from cStringIO import StringIO class iterparse(object): root = None def __init__(self, file,

[issue8583] Hardcoded namespace_separator in the cElementTree.XMLParser

2010-04-30 Thread Dmitry Chichkov
Changes by Dmitry Chichkov : -- keywords: +patch Added file: http://bugs.python.org/file17153/issue-8583.patch ___ Python tracker ___ _

[issue8583] Hardcoded namespace_separator in the cElementTree.XMLParser

2010-04-30 Thread Brian Curtin
Changes by Brian Curtin : -- nosy: +flox ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/

[issue8583] Hardcoded namespace_separator in the cElementTree.XMLParser

2010-04-30 Thread Dmitry Chichkov
New submission from Dmitry Chichkov : The namespace_separator parameter is hard coded in the cElementTree.XMLParser class disallowing the option of ignoring XML Namespaces with cElementTree library. Here's the code example: from xml.etree.cElementTree import iterparse from StringIO import St