Open
Description
Feature or enhancement
Proposal:
Refactor of xml.etree.ElementTree._namespaces
in preparation to simplify the logic to address the following gh issues, all of which require some changes to _namespaces
:
- etree: Defining the default namespace prefix (
""
) with register_namespace has issues #118416 (bug) - ElementTree incorrectly refuses to write attributes without namespaces when default_namespace is used #61290 (bug)
- ElementTree.tostring(..., default_namespace=...) incorrectly strips namespace from attributes #113581 (fix for 61290 also fixes this)
- ET: add custom namespaces to serialization methods #57587 (new feature)
Has this already been discussed elsewhere?
This is a minor feature, which does not need previous discussion elsewhere
Links to previous discussion of this feature:
No response