diff options
author | Sam Gross <colesbury@gmail.com> | 2024-01-31 11:22:24 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-01-31 11:22:24 (GMT) |
commit | 66f95ea6a65deff547cab0d312b8c8c8a4cf8beb (patch) | |
tree | 5cac9743bbbc47962ce321181adfba2575ec04e0 /Lib/xml/etree | |
parent | b7688ef71eddcaf14f71b1c22ff2f164f34b2c74 (diff) | |
download | cpython-66f95ea6a65deff547cab0d312b8c8c8a4cf8beb.zip cpython-66f95ea6a65deff547cab0d312b8c8c8a4cf8beb.tar.gz cpython-66f95ea6a65deff547cab0d312b8c8c8a4cf8beb.tar.bz2 |
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.
Diffstat (limited to 'Lib/xml/etree')
-rw-r--r-- | Lib/xml/etree/ElementTree.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Lib/xml/etree/ElementTree.py b/Lib/xml/etree/ElementTree.py index ae65750..bb7362d 100644 --- a/Lib/xml/etree/ElementTree.py +++ b/Lib/xml/etree/ElementTree.py @@ -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 |