Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 0261d75

Browse files
committed
Removing the test of Element that causes ref-leak in GC (issue #14464).
I will now continue investigating the cause of the ref-leak, but I wanted to remove the test so that the refcount test in the buildbots could be clean. The whole change (adding GC to Element) is not reverted because it improved the situation (GC works for immediate cycles) and didn't cause regressions (the test is new and was added together with the fix).
1 parent 29b964d commit 0261d75

1 file changed

Lines changed: 0 additions & 10 deletions

File tree

Lib/test/test_xml_etree.py

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1859,16 +1859,6 @@ class Dummy:
18591859
gc_collect()
18601860
self.assertIsNone(wref())
18611861

1862-
# A longer cycle: d->e->e2->d
1863-
e = ET.Element('joe')
1864-
d = Dummy()
1865-
d.dummyref = e
1866-
wref = weakref.ref(d)
1867-
e2 = ET.SubElement(e, 'foo', attr=d)
1868-
del d, e, e2
1869-
gc_collect()
1870-
self.assertIsNone(wref())
1871-
18721862

18731863
class ElementTreeTest(unittest.TestCase):
18741864
def test_istype(self):

0 commit comments

Comments
 (0)