mirror of
https://github.com/python/cpython.git
synced 2025-08-04 00:48:58 +00:00
gh-114737: Revert change to ElementTree.iterparse "root" attribute (GH-114755)
Prior to gh-114269, the iterator returned by ElementTree.iterparse was initialized with the root attribute as None. This restores the previous behavior.
This commit is contained in:
parent
b7688ef71e
commit
66f95ea6a6
2 changed files with 3 additions and 1 deletions
|
@ -1256,8 +1256,8 @@ def iterparse(source, events=None, parser=None):
|
|||
source.close()
|
||||
|
||||
it = IterParseIterator()
|
||||
it.root = None
|
||||
wr = weakref.ref(it)
|
||||
del IterParseIterator
|
||||
return it
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue