[issue26979] The danger of PyType_FromSpec()
Petr Viktorin
report at bugs.python.org
Thu Sep 13 19:27:31 EDT 2018
Petr Viktorin <encukou at gmail.com> added the comment:
Thanks! I think that explains enough of the issue.
Converting static types to heap ones is just one way you can use PyType_Spec. Another is writing new types, which should work much like Python classes.
So I don't think we should change the default, but rather document the use case. I'd rather update the docs after GH-9154 is merged, so this is blocked now.
I'll also try making an explicit `{Py_tp_dealloc, NULL}` override the inherited value, as per Serhiy's suggestion. But it'll only go to 3.8, so it won't help PySide now.
----------
_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue26979>
_______________________________________
More information about the Python-bugs-list
mailing list