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 petr.viktorin
Recipients hroncok, lukasz.langa, methane, miss-islington, petr.viktorin, tarun.johar, vstinner
Date 2021-08-05.08:33:02
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1628152382.87.0.698321919528.issue41103@roundup.psfhosted.org>
In-reply-to
Content
These should be removed from the *limited API*, but stay for the stable ABI.
(PEP 652 mentions this can happen but doesn't give details, which will be a bit tricky. These are good candidates for figuring out the process.)

I assigned this to myself; I'll try to get to it for 3.11.


> What is the benefit of removing this? Is copy pasting the compatibility layer to (possibly many) different projects worth the "cleanup"?

Yes. PyObject_AsReadBuffer is dangerous *in general*, but in certain specific cases where you're relying on CPython implementations details it can work. For example, borrowing a buffer from a *string* or *array* will work on CPython, and I don't see that changing any time soon. So, using PyObject_AsReadBuffer is still tech debt, but for some projects that's OK.

All this should be documented in the release notes, though, so the projects know what they're doing. (And the release notes should be written *with the change*, not later, so projects testing early can read them.)
History
Date User Action Args
2021-08-05 08:33:02petr.viktorinsetrecipients: + petr.viktorin, vstinner, methane, lukasz.langa, hroncok, miss-islington, tarun.johar
2021-08-05 08:33:02petr.viktorinsetmessageid: <1628152382.87.0.698321919528.issue41103@roundup.psfhosted.org>
2021-08-05 08:33:02petr.viktorinlinkissue41103 messages
2021-08-05 08:33:02petr.viktorincreate