[issue24373] Use traverse & finalize in xxlimited and in PEP 489 tests

2018-05-25 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: tp_finalize handlers should return "void". See issue33644. -- nosy: +serhiy.storchaka ___ Python tracker

[issue24373] Use traverse finalize in xxlimited and in PEP 489 tests

2015-06-04 Thread Nick Coghlan
Nick Coghlan added the comment: Would it also be worth making at docs update to tp_dealloc, suggesting the use of tp_traverse/finalize?: https://docs.python.org/3/c-api/typeobj.html#c.PyTypeObject.tp_dealloc And perhaps from PyType_FromSpec?

[issue24373] Use traverse finalize in xxlimited and in PEP 489 tests

2015-06-04 Thread Petr Viktorin
Petr Viktorin added the comment: tp_traverse is completely orthogonal to tp_dealloc, it's needed to detect (and then break) reference cycles like: obj = xxlimited.Xxo() obj.foo = obj As for tp_finalize: yes, mentioning it in tp_dealloc docs would be good, but I'll need a bit more

[issue24373] Use traverse finalize in xxlimited and in PEP 489 tests

2015-06-04 Thread Roundup Robot
Roundup Robot added the comment: New changeset 265eeb60443a by Nick Coghlan in branch '3.5': Issue #24373: Eliminate PEP 489 test refleaks https://hg.python.org/cpython/rev/265eeb60443a New changeset f24cd8bc5250 by Nick Coghlan in branch 'default': Merge fix for issue #24373 from 3.5

[issue24373] Use traverse finalize in xxlimited and in PEP 489 tests

2015-06-04 Thread Nick Coghlan
Changes by Nick Coghlan ncogh...@gmail.com: -- resolution: - fixed stage: - resolved status: open - closed type: - behavior ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24373 ___

[issue24373] Use traverse finalize in xxlimited and in PEP 489 tests

2015-06-03 Thread Petr Viktorin
New submission from Petr Viktorin: The example object in the xxlimited module can be part of a reference loop (it can contain itself), so it needs GC and tp_traverse. The tp_dealloc hook was incorrect, and a correct version would be difficult to generalize for something more complicated than