[3.11] gh-101438: Avoid reference cycle in ElementTree.iterparse. (GH… · python/cpython@9344ede · GitHub
Skip to content

Commit 9344ede

Browse files
[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 ce01ab5) Co-authored-by: Sam Gross <colesbury@gmail.com>
1 parent e85f4c6 commit 9344ede

2 files changed

Lines changed: 21 additions & 10 deletions

File tree

Lib/xml/etree/ElementTree.py

Lines changed: 17 additions & 10 deletions
Lines changed: 4 additions & 0 deletions

0 commit comments

Comments
 (0)