[Python-checkins] cpython: Removing the test of Element that causes ref-leak in GC (issue #14464).

eli.bendersky python-checkins at python.org
Sun Apr 1 16:41:47 CEST 2012


http://hg.python.org/cpython/rev/c5cf48752d81
changeset:   76050:c5cf48752d81
parent:      76048:015c546615ca
user:        Eli Bendersky <eliben at gmail.com>
date:        Sun Apr 01 17:40:17 2012 +0300
summary:
  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).

files:
  Lib/test/test_xml_etree.py |  10 ----------
  1 files changed, 0 insertions(+), 10 deletions(-)


diff --git a/Lib/test/test_xml_etree.py b/Lib/test/test_xml_etree.py
--- a/Lib/test/test_xml_etree.py
+++ b/Lib/test/test_xml_etree.py
@@ -1859,16 +1859,6 @@
         gc_collect()
         self.assertIsNone(wref())
 
-        # A longer cycle: d->e->e2->d
-        e = ET.Element('joe')
-        d = Dummy()
-        d.dummyref = e
-        wref = weakref.ref(d)
-        e2 = ET.SubElement(e, 'foo', attr=d)
-        del d, e, e2
-        gc_collect()
-        self.assertIsNone(wref())
-
 
 class ElementTreeTest(unittest.TestCase):
     def test_istype(self):

-- 
Repository URL: http://hg.python.org/cpython


More information about the Python-checkins mailing list