So here's my proposal:
- This API stays with the regular public API (Include/cpython/), but to
use it you'll need to #define Py_USING_UNSTABLE_API (name up for
I'm fine with the rest of what you suggest, but I don't think this is the right mechanical approach:
* "unstable" is the wrong term. We already have an unstable API tier: the internal API, which can change even in maintenance releases. The value of the new tier is that it is "semi stable": stable in maintenance releases, unstable in feature releases.
* the lesson I take from our stable ABI experience is that mixing two tiers of the API in a single header file is hard to maintain, as it's too easy to add a new API to the wrong section. A separate file that gets included automatically from the relevant header file(s) when the new definition is used makes the split much clearer.