Description of problem: xmltramp can't parse XML documents where a namespace prefix is declared on an element which has a following sibling. Version-Release number of selected component (if applicable): python-xmltramp-2.17-8.fc15 How reproducible: always Steps to Reproduce: python -c 'import sys, xmltramp; xmltramp.parse(sys.stdin.read())' <<EOF <a> <b xmlns:str="http://exslt.org/strings"/> <c/> </a> EOF Actual results: Traceback (most recent call last): File "<string>", line 1, in <module> File "/usr/lib/python2.7/site-packages/xmltramp.py", line 257, in parse return seed(StringIO(text)) File "/usr/lib/python2.7/site-packages/xmltramp.py", line 252, in seed parser.parse(fileobj) File "/usr/lib64/python2.7/xml/sax/expatreader.py", line 107, in parse xmlreader.IncrementalParser.parse(self, source) File "/usr/lib64/python2.7/xml/sax/xmlreader.py", line 123, in parse self.feed(buffer) File "/usr/lib64/python2.7/xml/sax/expatreader.py", line 207, in feed self._parser.Parse(data, isFinal) File "/usr/lib64/python2.7/xml/sax/expatreader.py", line 338, in start_element_ns AttributesNSImpl(newattrs, qnames)) File "/usr/lib/python2.7/site-packages/xmltramp.py", line 227, in startElementNS for k in self.prefixes.keys(): newprefixes[k] = self.prefixes[k][-1] IndexError: list index out of range Expected results: Should parse successfully. Additional info: Attaching patch with test.
Created attachment 531241 [details] patch for xmltramp.py
This message is a notice that Fedora 15 is now at end of life. Fedora has stopped maintaining and issuing updates for Fedora 15. It is Fedora's policy to close all bug reports from releases that are no longer maintained. At this time, all open bugs with a Fedora 'version' of '15' have been closed as WONTFIX. (Please note: Our normal process is to give advanced warning of this occurring, but we forgot to do that. A thousand apologies.) Package Maintainer: If you wish for this bug to remain open because you plan to fix it in a currently maintained version, feel free to reopen this bug and simply change the 'version' to a later Fedora version. Bug Reporter: Thank you for reporting this issue and we are sorry that we were unable to fix it before Fedora 15 reached end of life. If you would still like to see this bug fixed and are able to reproduce it against a later version of Fedora, you are encouraged to click on "Clone This Bug" (top right of this page) and open it against that version of Fedora. Although we aim to fix as many bugs as possible during every release's lifetime, sometimes those efforts are overtaken by events. Often a more recent Fedora release includes newer upstream software that fixes bugs or makes them obsolete. The process we are following is described here: http://fedoraproject.org/wiki/BugZappers/HouseKeeping
Bug still applies in F17: $ rpm -q python-xmltramp python-xmltramp-2.17-9.fc17.noarch $ python -c 'import sys, xmltramp; xmltramp.parse(sys.stdin.read())' <<EOF > <a> > <b xmlns:str="http://exslt.org/strings"/> > <c/> > </a> > EOF Traceback (most recent call last): File "<string>", line 1, in <module> File "/usr/lib/python2.7/site-packages/xmltramp.py", line 257, in parse return seed(StringIO(text)) File "/usr/lib/python2.7/site-packages/xmltramp.py", line 252, in seed parser.parse(fileobj) File "/usr/lib64/python2.7/site-packages/_xmlplus/sax/expatreader.py", line 109, in parse xmlreader.IncrementalParser.parse(self, source) File "/usr/lib64/python2.7/site-packages/_xmlplus/sax/xmlreader.py", line 123, in parse self.feed(buffer) File "/usr/lib64/python2.7/site-packages/_xmlplus/sax/expatreader.py", line 216, in feed self._parser.Parse(data, isFinal) File "/usr/lib64/python2.7/site-packages/_xmlplus/sax/expatreader.py", line 352, in start_element_ns AttributesNSImpl(newattrs, qnames)) File "/usr/lib/python2.7/site-packages/xmltramp.py", line 227, in startElementNS for k in self.prefixes.keys(): newprefixes[k] = self.prefixes[k][-1] IndexError: list index out of range
Bug still applicable on F18. $ rpm -q python-xmltramp python-xmltramp-2.17-10.fc18.noarch $ python -c 'import sys, xmltramp; xmltramp.parse(sys.stdin.read())' <a> <b xmlns:str="http://exslt.org/strings"/> <c/> </a> Traceback (most recent call last): File "<string>", line 1, in <module> File "/usr/lib/python2.7/site-packages/xmltramp.py", line 257, in parse return seed(StringIO(text)) File "/usr/lib/python2.7/site-packages/xmltramp.py", line 252, in seed parser.parse(fileobj) File "/usr/lib64/python2.7/xml/sax/expatreader.py", line 107, in parse xmlreader.IncrementalParser.parse(self, source) File "/usr/lib64/python2.7/xml/sax/xmlreader.py", line 123, in parse self.feed(buffer) File "/usr/lib64/python2.7/xml/sax/expatreader.py", line 207, in feed self._parser.Parse(data, isFinal) File "/usr/lib64/python2.7/xml/sax/expatreader.py", line 338, in start_element_ns AttributesNSImpl(newattrs, qnames)) File "/usr/lib/python2.7/site-packages/xmltramp.py", line 227, in startElementNS for k in self.prefixes.keys(): newprefixes[k] = self.prefixes[k][-1] IndexError: list index out of range
This package has changed ownership in the Fedora Package Database. Reassigning to the new owner of this component.
python-xmltramp-2.17-12.fc19 has been submitted as an update for Fedora 19. https://admin.fedoraproject.org/updates/python-xmltramp-2.17-12.fc19
python-xmltramp-2.17-12.fc18 has been submitted as an update for Fedora 18. https://admin.fedoraproject.org/updates/python-xmltramp-2.17-12.fc18
python-xmltramp-2.17-12.fc17 has been submitted as an update for Fedora 17. https://admin.fedoraproject.org/updates/python-xmltramp-2.17-12.fc17
Package python-xmltramp-2.17-12.fc18: * should fix your issue, * was pushed to the Fedora 18 testing repository, * should be available at your local mirror within two days. Update it with: # su -c 'yum update --enablerepo=updates-testing python-xmltramp-2.17-12.fc18' as soon as you are able to. Please go to the following url: https://admin.fedoraproject.org/updates/FEDORA-2013-10322/python-xmltramp-2.17-12.fc18 then log in and leave karma (feedback).
python-xmltramp-2.17-12.fc19 has been pushed to the Fedora 19 stable repository. If problems still persist, please make note of it in this bug report.
python-xmltramp-2.17-12.fc18 has been pushed to the Fedora 18 stable repository. If problems still persist, please make note of it in this bug report.
python-xmltramp-2.17-12.fc17 has been pushed to the Fedora 17 stable repository. If problems still persist, please make note of it in this bug report.