[issue30485] Element.findall(path, dict) doesn't insert null namespace

Stefan Behnel report at bugs.python.org
Sun Apr 14 14:41:20 EDT 2019


Stefan Behnel <stefan_ml at behnel.de> added the comment:

Interesting. Thanks for investigating this. It looks like the script "appxmanifest.py" uses an empty string as prefix for a lookup:

  File "D:\a\1\s\PC\layout\support\appxmanifest.py", line 407, in get_appxmanifest
    node = xml.find("m:Identity", NS)

I don't know where that script comes from, but it suggests that strictly rejecting this kind of invalid library usage might not be the right thing to do for now. It seems to be a case where users pass an arbitrary prefix-namespace dict into .find() that they happen to have lying around, expecting unused mappings to be ignored. I pushed a PR that removes the exception for now.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue30485>
_______________________________________


More information about the Python-bugs-list mailing list