Nick Coghlan <ncogh...@gmail.com> added the comment: That does look like it will fix the leak, but now I'm actually thinking there's more code from type_new that should also be executed in the PyType_FromSpec case.
I mean things like: - ensuring __new__ is a static method - ensuring the standard attribute lookup machinery is configured - hooking up tp_as_number, tp_as_mapping, etc - ensuring GC support is configured correctly If that's all happening somehow, it could use a comment, because I certainly can't see it. If not, we probably need to factor out some helper functions that type_new and PyType_FromSpec can both call to make sure everything is fully configured. ---------- nosy: +ncoghlan _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue15142> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com