07.06.21 08:41, Hai Shi пише:
There have an another question. There have many C API defined under PY_SSIZE_T_CLEAN, for example: _PyArg_Parse_SizeT(). Could we remove or merge them after making PY_SSIZE_T_CLEAN not mandatory?
We should support binary compatibility to some degree, so there should be several steps: * Make macro PyArg_Parse an alias of _PyArg_Parse_SizeT. Keep function PyArg_Parse. * Make function PyArg_Parse always raising an exception. * Remove function PyArg_Parse. * [Optionally] Now we can re-add function PyArg_Parse as an alias of _PyArg_Parse_SizeT and remove macro PyArg_Parse. * [Optionally in 4.0 or 5.0] Remove _PyArg_Parse_SizeT. But we can squish several last steps in 4.0 which do not need to support binary compatibility with 3.x.