gh-101438: Avoid reference cycle in ElementTree.iterparse. (GH-114269) · python/cpython@ce01ab5 · GitHub
Skip to content

Commit ce01ab5

Browse files
authored
gh-101438: Avoid reference cycle in ElementTree.iterparse. (GH-114269)
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.
1 parent 8c26540 commit ce01ab5

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)