Petr Viktorin <encu...@gmail.com> added the comment:
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.) ---------- assignee: -> petr.viktorin nosy: +petr.viktorin status: closed -> open _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue41103> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com