Skip to content

gh-145056: Accept frozendict in xml.etree - #145508

Merged
vstinner merged 2 commits into
python:mainfrom
vstinner:frozendict_etree
Mar 5, 2026
Merged

vstinner merged 2 commits into
python:mainfrom
vstinner:frozendict_etree

Conversation

@vstinner

@vstinner vstinner commented Mar 4, 2026 •

Copy link
Copy Markdown
Member

Element and SubElement of xml.etree.ElementTree now also accept frozendict as attrib.


📚 Documentation preview 📚: https://cpython-previews--145508.org.readthedocs.build/

Element and SubElement of xml.etree.ElementTree now also accept
frozendict as attrib.
@vstinner

vstinner commented Mar 4, 2026

Copy link
Copy Markdown
Member Author

I prefer to wait until #145517 is merged before merging this PR, so I mark this PR as a draft for now.

@vstinner
vstinner marked this pull request as ready for review March 5, 2026 11:53
@vstinner
vstinner merged commit 7bdfce0 into python:main Mar 5, 2026
49 of 50 checks passed
@vstinner
vstinner deleted the frozendict_etree branch March 5, 2026 11:55
@vstinner

vstinner commented Mar 5, 2026

Copy link
Copy Markdown
Member Author

I prefer to wait until #145517 is merged before merging this PR, so I mark this PR as a draft for now.

The situation looks more complicated than what I expected. So I merged this change with the temporary solution: _PyDict_CopyAsDict() function.

ljfp pushed a commit to ljfp/cpython that referenced this pull request Apr 25, 2026
Element and SubElement of xml.etree.ElementTree now also accept
frozendict for attrib.

Export _PyDict_CopyAsDict() function.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

1 participant