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 scoder
Recipients ncoghlan, paul.moore, petr.viktorin, pitrou, scoder, skrah, vstinner
Date 2020-05-22.07:51:00
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1590133862.04.0.206694262407.issue40724@roundup.psfhosted.org>
In-reply-to
Content
As far as I can see it in typeslots.h [1], the buffer protocol is still not supported when using type specs:

/* Disabled, see #10181 */
#undef Py_bf_getbuffer
#undef Py_bf_releasebuffer

It seems that the discussion in issue 10181 did not lead anywhere at the time (2010-2012).

I'm not talking about the limited API or the stable ABI here, I'm talking about using type specs to define an extension type. The work-around is to manually set "PyTypeObject->tp_as_buffer" after creating the type, but since PyType_Ready() then does not see that struct pointer, you also still have to make sure that the type correctly inherits the slots from the base type if you're not defining all of them yourself.

Can we just add support for the above slots?

[1] https://github.com/python/cpython/blob/ca829102213c466ffecb1e464be5c8cb3967d961/Include/typeslots.h#L2-L4
History
Date User Action Args
2020-05-22 07:51:02scodersetrecipients: + scoder, paul.moore, ncoghlan, pitrou, vstinner, petr.viktorin, skrah
2020-05-22 07:51:02scodersetmessageid: <1590133862.04.0.206694262407.issue40724@roundup.psfhosted.org>
2020-05-22 07:51:02scoderlinkissue40724 messages
2020-05-22 07:51:00scodercreate