[New-bugs-announce] [issue44609] Buffer support in the stable ABI

Tarun Johar report at bugs.python.org
Mon Jul 12 11:05:02 EDT 2021


New submission from Tarun Johar <tarun.johar at gmail.com>:

PEP 384 and PEP 652 define a stable ABI to be used with Python 3.2 and later.  On Windows, symbols for the stable ABI are exported from the python3.dll shared library.

The following functions are present in Python 3.9 but have been removed from Python 3.10b3:

PyObject_AsCharBuffer()
PyObject_AsReadBuffer()
PyObject_AsWriteBuffer()
PyObject_CheckReadBuffer()

The justification for the removal of these functions was discussed in this issue:

https://bugs.python.org/issue41103

Without these functions, an extension cannot utilize the stable ABI to access the buffer memory of data structures.  The buffer protocol is suggested as an alternative, but the buffer functions PyObject_GetBuffer() and PyBuffer_Release() are not present in the stable ABI.

While these two functions may be added to the stable ABI, removal of the four functions above makes Python 3.10 incompatible with previous versions.  It is requested that the four functions be reinstated and maintained as described in PEP 652.

----------
components: Build
messages: 397319
nosy: tarun.johar
priority: normal
severity: normal
status: open
title: Buffer support in the stable ABI
type: behavior
versions: Python 3.10

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue44609>
_______________________________________


More information about the New-bugs-announce mailing list