[issue28871] Destructor of ElementTree.Element is recursive

2017-03-31 Thread Donald Stufft
Changes by Donald Stufft : -- pull_requests: +975 ___ Python tracker ___ ___

[issue28871] Destructor of ElementTree.Element is recursive

2017-01-12 Thread STINNER Victor
STINNER Victor added the comment: > Yet one argument for moving to Python 3. Yep, thanks ;-) -- ___ Python tracker ___

[issue28871] Destructor of ElementTree.Element is recursive

2017-01-12 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Changes were reverted by 78bf34b6a713. It is very uneasy to implement an alternative mechanism (without increasing the size of Element objects). It adds duplication of low level garbage collecting code. I think it is better to left all as is in 2.7. Yet one

[issue28871] Destructor of ElementTree.Element is recursive

2016-12-28 Thread STINNER Victor
STINNER Victor added the comment: This issue seems theorical to me, whereas the breakage of benchmarks is very concrete for me. So I suggest to revert the change in Python 2.7. (2) looks like the right design and it was implemented in Python 3 (no?). I don't think that it's worth it to

[issue28871] Destructor of ElementTree.Element is recursive

2016-12-27 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Ah, I tested only with non-debug build in which asserts were ignored! In 2.7 Element doesn't support garbage collection, and the trashcan mechanism Py_TRASHCAN_SAFE_BEGIN/Py_TRASHCAN_SAFE_END can't be applied. I see three alternatives: 1. Just revert the

[issue28871] Destructor of ElementTree.Element is recursive

2016-12-27 Thread STINNER Victor
STINNER Victor added the comment: haypo@selma$ gdb -args ./python ~/bug.py (gdb) run python: Objects/object.c:2453: _PyTrash_thread_deposit_object: Assertion `PyObject_IS_GC(op)' failed. Program received signal SIGABRT, Aborted. (gdb) py-bt Traceback (most recent call first): File

[issue28871] Destructor of ElementTree.Element is recursive

2016-12-27 Thread STINNER Victor
STINNER Victor added the comment: bm_xml_etree.py benchmark started to crash on Python 2.7 because of the change 78bf34b6a713. Python 2.7 @ 78bf34b6a713: bug.py does crash Python 2.7 @ 32cc37a89b58: no crash Full script:

[issue28871] Destructor of ElementTree.Element is recursive

2016-12-21 Thread Roundup Robot
Roundup Robot added the comment: New changeset 957091874ea0 by Serhiy Storchaka in branch '3.5': Issue #28871: Fixed a crash when deallocate deep ElementTree. https://hg.python.org/cpython/rev/957091874ea0 New changeset 78bf34b6a713 by Serhiy Storchaka in branch '2.7': Issue #28871: Fixed a

[issue28871] Destructor of ElementTree.Element is recursive

2016-12-21 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- assignee: -> serhiy.storchaka resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker

[issue28871] Destructor of ElementTree.Element is recursive

2016-12-14 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Proposed patch fixes the crash. -- keywords: +patch stage: needs patch -> patch review Added file: http://bugs.python.org/file45900/etree-trashcan.patch ___ Python tracker

[issue28871] Destructor of ElementTree.Element is recursive

2016-12-04 Thread Serhiy Storchaka
New submission from Serhiy Storchaka: The Element class in the xml.etree.ElementTree module is a collection. It can contain other Element's. But unlike to common Python collections (list, dict, etc) and pure Python classes, C implementation of Element doesn't support unlimited recursion. As