Skip to content

gh-57336: Deprecate setting read-only attributes in xml.dom.minidom - #155627

Open
serhiy-storchaka wants to merge 1 commit into
python:mainfrom
serhiy-storchaka:gh-57336-deprecate-readonly-setters
Open

gh-57336: Deprecate setting read-only attributes in xml.dom.minidom#155627
serhiy-storchaka wants to merge 1 commit into
python:mainfrom
serhiy-storchaka:gh-57336-deprecate-readonly-setters

Conversation

@serhiy-storchaka

Copy link
Copy Markdown
Member

In the DOM model most node attributes are read-only, but in minidom only localName and length raised NoModificationAllowedErr. Setting the other ones silently left the node inconsistent with the document: for example, setting Attr.name renamed the attribute node, but the owner element still kept it under the old name.

Setting them now emits a DeprecationWarning. They are also documented as read-only.

@read-the-docs-community

read-the-docs-community Bot commented Aug 12, 2026

Copy link
Copy Markdown

Documentation build overview

📚 cpython-previews | 🛠️ Build #34034643 | 📁 Comparing 94bd452 against main (b11e749)

  🔍 Preview build  

3 files changed
± library/xml.dom.html
± whatsnew/3.16.html
± whatsnew/changelog.html

…idom

In the DOM model most node attributes are read-only, but in minidom only
localName and length raised NoModificationAllowedErr.  Setting the other
ones silently left the node inconsistent with the document: for example,
setting Attr.name renamed the attribute node, but the owner element still
kept it under the old name.

Setting them now emits a DeprecationWarning.  They are also documented as
read-only.
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