Skip to content

Commit dd7da01

Browse files
committed
test_xml_etree.py: Drop mistaken test_issue3151
Curly brackets were never allowed in namespace URIs according to RFC 3986, and so-called namespace-validating XML parsers have the right to reject them a invalid URIs. libexpat >=2.4.5 has become strcter in that regard due to related security issues; with ET.XML instantiating a namespace-aware parser under the hood, this test has no future in CPython. References: - https://datatracker.ietf.org/doc/html/rfc3968 - https://www.w3.org/TR/xml-names/
1 parent a3fcca4 commit dd7da01

File tree

1 file changed

+0
-6
lines changed

1 file changed

+0
-6
lines changed

Lib/test/test_xml_etree.py

-6
Original file line numberDiff line numberDiff line change
@@ -2192,12 +2192,6 @@ def test_issue6233(self):
21922192
b"<?xml version='1.0' encoding='ascii'?>\n"
21932193
b'<body>t&#227;g</body>')
21942194

2195-
def test_issue3151(self):
2196-
e = ET.XML('<prefix:localname xmlns:prefix="${stuff}"/>')
2197-
self.assertEqual(e.tag, '{${stuff}}localname')
2198-
t = ET.ElementTree(e)
2199-
self.assertEqual(ET.tostring(e), b'<ns0:localname xmlns:ns0="${stuff}" />')
2200-
22012195
def test_issue6565(self):
22022196
elem = ET.XML("<body><tag/></body>")
22032197
self.assertEqual(summarize_list(elem), ['tag'])

0 commit comments

Comments
 (0)