Pypy and Lxml 3.0: still referenced nodes are garbage collected
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
lxml |
Fix Released
|
Medium
|
scoder |
Bug Description
This code shows how nodes are disappearing with Lxml 3.0 under Pypy:
-----------
import gc
from lxml import etree
root = etree.Element(
etree.SubElemen
# OK
print root.getchildren() # [<Element bar at 0x10106a320>]
# KO
gc.collect()
print root.getchildren() # [None]
-----------
Tested on MacOS:
Python : (major=2, minor=7, micro=2, releaselevel=
lxml.etree : (3, 0, 0, 0)
libxml used : (2, 7, 8)
libxml compiled : (2, 7, 8)
libxslt used : (1, 1, 26)
libxslt compiled : (1, 1, 26)
and Linux:
Python : (major=2, minor=7, micro=2, releaselevel=
lxml.etree : (3, 0, 0, 0)
libxml used : (2, 8, 0)
libxml compiled : (2, 8, 0)
libxslt used : (1, 1, 27)
libxslt compiled : (1, 1, 27)
Changed in lxml: | |
milestone: | none → 3.0 |
Thanks for the excellent test case. I'll see if I can fix it.