summaryrefslogtreecommitdiffstats
path: root/Lib/xml/etree
diff options
context:
space:
mode:
authorStefan Behnel <stefan_ml@behnel.de>2019-04-14 19:12:34 (GMT)
committerGitHub <noreply@github.com>2019-04-14 19:12:34 (GMT)
commit3c5a858ec6a4e5851903762770fe526a46d3c351 (patch)
treed6a95ae26cb8b9f1c0963248e79a60f0d87726c3 /Lib/xml/etree
parentcd466559c4a312b3c1223a774ad4df19fc4f0407 (diff)
downloadcpython-3c5a858ec6a4e5851903762770fe526a46d3c351.zip
cpython-3c5a858ec6a4e5851903762770fe526a46d3c351.tar.gz
cpython-3c5a858ec6a4e5851903762770fe526a46d3c351.tar.bz2
bpo-30485: Re-allow empty strings in ElementPath namespace mappings since they might actually be harmless and unused (and thus went undetected previously). (#12830)
Diffstat (limited to 'Lib/xml/etree')
-rw-r--r--Lib/xml/etree/ElementPath.py2
1 files changed, 0 insertions, 2 deletions
diff --git a/Lib/xml/etree/ElementPath.py b/Lib/xml/etree/ElementPath.py
index 0e3854f..4d231a7 100644
--- a/Lib/xml/etree/ElementPath.py
+++ b/Lib/xml/etree/ElementPath.py
@@ -275,8 +275,6 @@ def iterfind(elem, path, namespaces=None):
cache_key = (path,)
if namespaces:
- if '' in namespaces:
- raise ValueError("empty namespace prefix must be passed as None, not the empty string")
if None in namespaces:
cache_key += (namespaces[None],) + tuple(sorted(
item for item in namespaces.items() if item[0] is not None))