Batuhan Taskaya <batuhanosmantask...@gmail.com> added the comment:

Moving assertion from _PyObject_GC_TRACK to gen_dealloc (just before the 
_PyObject_GC_TRACK call) results with success (????)

     if (gen->gi_weakreflist != NULL)
         PyObject_ClearWeakRefs(self);
-
+    _PyObject_ASSERT_FROM(self, !_PyObject_GC_IS_TRACKED(self),
+                          "object already tracked by they garbage collector",
+                          __FILE__, __LINE__, "_PyObject_GC_TRACK");
     _PyObject_GC_TRACK(self);
 
     if (PyObject_CallFinalizerFromDealloc(self))

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue40244>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to