Skip to content

gh-157518: Validate the prefix in xml.etree.ElementTree.register_namespace() - #157521

Open
serhiy-storchaka wants to merge 2 commits into
python:mainfrom
serhiy-storchaka:gh-157518-register-namespace-check
Open

serhiy-storchaka wants to merge 2 commits into
python:mainfrom
serhiy-storchaka:gh-157518-register-namespace-check

Conversation

@serhiy-storchaka

Copy link
Copy Markdown
Member

ValueError is now raised for an invalid prefix, for the reserved xmlns prefix, and for the xml prefix bound to other namespace or other prefix bound to the XML namespace, as the documentation always promised. Only the reserved nsN prefixes were rejected before.

…r_namespace()

ValueError is now raised for an invalid prefix, for the reserved xmlns
prefix, and for the xml prefix bound to other namespace or other prefix
bound to the XML namespace, as the documentation always promised.
Only the reserved nsN prefixes were rejected before.
@read-the-docs-community

read-the-docs-community Bot commented Sep 14, 2026

Copy link
Copy Markdown

Documentation build overview

📚 cpython-previews | 🛠️ Build #34556147 | 📁 Comparing 8fd4fc7 against main (c215919)

  🔍 Preview build  

2 files changed
± library/xml.etree.elementtree.html
± whatsnew/changelog.html

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant