Alexander Mohr added the comment:

I'm hoping this is the fix:

--- Modules/_asynciomodule.c.orig       2017-07-31 12:16:16.000000000 -0700
+++ Modules/_asynciomodule.c    2017-07-31 13:08:52.000000000 -0700
@@ -953,15 +953,18 @@
 FutureObj_dealloc(PyObject *self)
 {
     FutureObj *fut = (FutureObj *)self;
+    PyObject_GC_UnTrack(self);
 
     if (Future_CheckExact(fut)) {
         /* When fut is subclass of Future, finalizer is called from
          * subtype_dealloc.
          */
+        _PyObject_GC_TRACK(self);
         if (PyObject_CallFinalizerFromDealloc(self) < 0) {
             // resurrected.
             return;
         }
+        _PyObject_GC_UNTRACK(self);
     }
 
     if (fut->fut_weakreflist != NULL) {
@@ -1828,14 +1831,18 @@
 {
     TaskObj *task = (TaskObj *)self;
 
+    PyObject_GC_UnTrack(self);
+
     if (Task_CheckExact(self)) {
         /* When fut is subclass of Task, finalizer is called from
          * subtype_dealloc.
          */
+         _PyObject_GC_TRACK(self);
         if (PyObject_CallFinalizerFromDealloc(self) < 0) {
             // resurrected.
             return;
         }
+        _PyObject_GC_UNTRACK(self);
     }
 
     if (task->task_weakreflist != NULL) {

----------

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

Reply via email to