➜

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.

作者 vstinner
收信人 vstinner
日期 2018-11-01.12:46:48
SpamBayes Score -1.0
Marked as misclassified 是
Message-id <1541076409.33.0.788709270274.issue35134@psf.upfronthosting.co.za>
In-reply-to
内容
The PEP 384 "Defining a Stable ABI" introduced Py_LIMITED_API define to exclude functions from the Python C API. The problem is when a new API is introduced, it has to explicitly be excluded using "#ifndef Py_LIMITED_API". If the author forgets it, the function is added to be stable API by mistake.

I propose to move the API which should be excluded from the stable ABI to a new subdirectory: Include/pycapi/.

To not break the backward compatibility, I propose to automatically include new header files from existing header files. For example, Include/pycapi/pyapi_objimpl.h would be automatically included by Include/pycapi/pycapi_objimpl.h.

New header files would have a "pycapi_" prefix to avoid conflict Include/ header files, if Include/pycapi/ directory is in the header search paths.

This change is a follow-up of bpo-35081 which moved Py_BUILD_CORE code to Include/internal/.

It is also part of a larger project to cleanup the C API, see:

* https://pythoncapi.readthedocs.io/split_include.html
* https://pythoncapi.readthedocs.io/

The change is backward compatible: #include <Python.h> will still provide exactly the same API.
历史
日期 用户 动作 参数
2018-11-01 12:46:49vstinner修改recipients: + vstinner
2018-11-01 12:46:49vstinner修改messageid: <1541076409.33.0.788709270274.issue35134@psf.upfronthosting.co.za>
2018-11-01 12:46:49vstinner链接issue35134 messages
2018-11-01 12:46:48vstinner创建