]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
[3.11] gh-101438: Avoid reference cycle in ElementTree.iterparse. (GH-114269) (GH...
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Tue, 23 Jan 2024 20:49:13 +0000 (21:49 +0100)
committerGitHub <noreply@github.com>
Tue, 23 Jan 2024 20:49:13 +0000 (20:49 +0000)
commit9344edeb75e299baeee51dbc26172977475827ef
tree6b30f2881d3cf88ba36d82bb6c90c86c43ba6af1
parente85f4c6fa96d9b6f7d4a1d0a9ac07c12ba7f33db
[3.11] gh-101438: Avoid reference cycle in ElementTree.iterparse. (GH-114269) (GH-114500)

The iterator returned by ElementTree.iterparse() may hold on to a file
descriptor. The reference cycle prevented prompt clean-up of the file
descriptor if the returned iterator was not exhausted.
(cherry picked from commit ce01ab536f22a3cf095d621f3b3579c1e3567859)

Co-authored-by: Sam Gross <colesbury@gmail.com>
Lib/xml/etree/ElementTree.py
Misc/NEWS.d/next/Library/2024-01-18-22-29-28.gh-issue-101438.1-uUi_.rst [new file with mode: 0644]