]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
gh-142306: Improve errors for Element.remove() (GH-142308)
authorSerhiy Storchaka <storchaka@gmail.com>
Mon, 12 Jan 2026 09:49:18 +0000 (11:49 +0200)
committerGitHub <noreply@github.com>
Mon, 12 Jan 2026 09:49:18 +0000 (11:49 +0200)
commitf3759d21dd5e6510361d7409a1df53f35ebd9a58
tree053877f4321403af3b1fc668ca0efbe8de055436
parentdbd10a6c29ba1cfc9348924a090b5dc514470002
gh-142306: Improve errors for Element.remove() (GH-142308)

* Raise TypeError for non-element argument in the Python implementation
  too.
* Include the repr of the elements in the ValueError error message.
Lib/test/test_xml_etree.py
Lib/xml/etree/ElementTree.py
Misc/NEWS.d/next/Library/2025-12-05-17-22-25.gh-issue-142306.Gj3_1m.rst [new file with mode: 0644]
Modules/_elementtree.c