This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author serhiy.storchaka
Recipients brandtbucher, domdfcoding, gvanrossum, ncoghlan, rhettinger, serhiy.storchaka
Date 2021-08-06.06:46:25
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1628232385.25.0.518688694269.issue43838@roundup.psfhosted.org>
In-reply-to
Content
Good catch! Thank you Raymond for the third example.

I though that it can be easily fixed by calling tp_traverse() for submapping:

 static int
 mappingproxy_traverse(PyObject *self, visitproc visit, void *arg)
 {
     mappingproxyobject *pp = (mappingproxyobject *)self;
-    Py_VISIT(pp->mapping);
-    return 0;
+    return Py_TYPE(pp->mapping)->tp_traverse(pp->mapping, visit, arg);
 }

but it does not work.

So I am okay with closing this issue.
History
Date User Action Args
2021-08-06 06:46:25serhiy.storchakasetrecipients: + serhiy.storchaka, gvanrossum, rhettinger, ncoghlan, brandtbucher, domdfcoding
2021-08-06 06:46:25serhiy.storchakasetmessageid: <1628232385.25.0.518688694269.issue43838@roundup.psfhosted.org>
2021-08-06 06:46:25serhiy.storchakalinkissue43838 messages
2021-08-06 06:46:25serhiy.storchakacreate