Skip to content

gh-158208: Don't write a duplicate xmlns attribute in xml.dom.minidom - #158211

Open
Tony123-tech wants to merge 3 commits into
python:mainfrom
Tony123-tech:gh-158208-fix-duplicate-xmlns
Open

Tony123-tech wants to merge 3 commits into
python:mainfrom
Tony123-tech:gh-158208-fix-duplicate-xmlns

Conversation

@Tony123-tech

@Tony123-tech Tony123-tech commented Sep 26, 2026 •

Copy link
Copy Markdown

Element.writexml() added an empty xmlns="" declaration to elements in no namespace even when the element had an explicit xmlns attribute, producing output that is not well-formed. Skip the empty declaration if the element itself declares a default namespace via setAttribute("xmlns", ...).

…inidom

Element.writexml() added an empty xmlns="" declaration to elements
in no namespace even when the element had an explicit xmlns
attribute, producing output that is not well-formed.  Skip the empty
declaration if the element itself declares a default namespace via
setAttribute("xmlns", ...).
@python-cla-bot

python-cla-bot Bot commented Sep 26, 2026 •

Copy link
Copy Markdown

All commit authors signed the Contributor License Agreement.

CLA signed

@bedevere-app

bedevere-app Bot commented Sep 26, 2026

Copy link
Copy Markdown

Most changes to Python require a NEWS entry. Add one using the blurb_it web app or the blurb command-line tool.

If this change has little impact on Python users, wait for a maintainer to apply the skip news label instead.

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