[issue16195] Difficult or impossible to figure out how garbage collector and weak references should interact for user-defined extension types

2013-10-05 Thread Stefan Behnel
Stefan Behnel added the comment: Just as a quick update here: Cython has since then switched to only using PyObject_ClearWeakRefs() and otherwise leaves the handling of the weakref slot to CPython. -- ___ Python tracker rep...@bugs.python.org

[issue16195] Difficult or impossible to figure out how garbage collector and weak references should interact for user-defined extension types

2013-10-04 Thread Phil Connell
Changes by Phil Connell pconn...@gmail.com: -- nosy: +pconnell ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16195 ___ ___ Python-bugs-list

[issue16195] Difficult or impossible to figure out how garbage collector and weak references should interact for user-defined extension types

2012-10-19 Thread Jesús Cea Avión
Changes by Jesús Cea Avión j...@jcea.es: -- nosy: +jcea ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16195 ___ ___ Python-bugs-list mailing list

[issue16195] Difficult or impossible to figure out how garbage collector and weak references should interact for user-defined extension types

2012-10-11 Thread Jean-Paul Calderone
New submission from Jean-Paul Calderone: There appears to be very little, if any, documentation about how to handle the list at tp_weaklistoffset for types supporting being weak referenced, particularly with respect to garbage collection. Who owns the list? Who owns the objects in the list?

[issue16195] Difficult or impossible to figure out how garbage collector and weak references should interact for user-defined extension types

2012-10-11 Thread Andrew Svetlov
Changes by Andrew Svetlov andrew.svet...@gmail.com: -- nosy: +asvetlov ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16195 ___ ___

[issue16195] Difficult or impossible to figure out how garbage collector and weak references should interact for user-defined extension types

2012-10-11 Thread Antoine Pitrou
Antoine Pitrou added the comment: I think Cython is wrong here. The only thing to do is to call PyObject_ClearWeakRefs() in the deallocator. Everything else is handled by the interpreter. Agreed improving the documentation would be good. -- nosy: +pitrou, scoder stage: - needs patch