Mailing List Archive

[issue14934] generator objects can clear their weakrefs before being resurrected
New submission from Antoine Pitrou <pitrou@free.fr>:

In Objects/genobject.c, gen_dealloc() calls PyObject_ClearWeakRefs() before trying to finalize the generator, during which the generator object can be resurrected. This is probably a bug, since weakrefs are supposed to be cleared (and their callbacks called) only when the object is really being destroyed.

(see also issue14933)

----------
components: Interpreter Core
messages: 161781
nosy: ncoghlan, pitrou
priority: low
severity: normal
status: open
title: generator objects can clear their weakrefs before being resurrected
type: behavior
versions: Python 2.7, Python 3.2, Python 3.3

_______________________________________
Python tracker <report@bugs.python.org>
<http://bugs.python.org/issue14934>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/list-python-bugs%40lists.gossamer-threads.com