You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
On python-dev, it became clear that it would be useful to have a “semi-stable” “unstable” C-API tier which will stay stable within a minor release.
This API will go in a new directory (Include/unstable/) - see Nick's reply
You'll need to #define Py_USING_UNSTABLE_API.
(name still up for bikeshedding).
Since we're nearing Beta and there's no rush to break things, in 3.11
you only get a warning if you try to use it without the opt-in #define.
In 3.12 it'll fail.
The functions will be renamed to drop the leading underscore. The old
names will be available, and may be removed
whenever the API changes. (Ideally, the underscore should always mark
API that's fully private with no guarantees at all.)
Get SC approval (this is now PEP-689 that will need acceptance)
The API will be stable during a minor release. (As usual, for extreme
cases, exceptions are possible with SC approval.)
Ideally anything documented as subject to change between minor
releases. (To be kind to users, if something is added later we should
again have one release of compiler warnings before requiring the opt-in.
Unless that API just changed and users would get errors anyway.)
non-opaque access to frame structs and any other key APIs needed to
implement alternate eval loops with comparable performance to the default
eval loop (unless & until we can figure out stable public APIs that can
deliver equivalent performance) - see Nick's reply
C APIs that provide access to compiled code whether in AST or opcode
form (the API itself may be stable, but the compiled code isn't, so this is
kinda covered by your last point) - see Nick's reply
On python-dev, it became clear that it would be useful to have a
“semi-stable”“unstable” C-API tier which will stay stable within a minor release.This API will go in a new directory (
Include/unstable/) - see Nick's replyYou'll need to #define
Py_USING_UNSTABLE_API.(name still up for bikeshedding).
Since we're nearing Beta and there's no rush to break things, in 3.11
you only get a warning if you try to use it without the opt-in #define.
In 3.12 it'll fail.
The functions will be renamed to drop the leading underscore. The old
names will be available, and may be removed
whenever the API changes. (Ideally, the underscore should always mark
API that's fully private with no guarantees at all.)
Get SC approval (this is now PEP-689 that will need acceptance)
The API will be stable during a minor release. (As usual, for extreme
cases, exceptions are possible with SC approval.)
Docs:
All ununstable API should be tested
What should be here:
releases. (To be kind to users, if something is added later we should
again have one release of compiler warnings before requiring the opt-in.
Unless that API just changed and users would get errors anyway.)
implement alternate eval loops with comparable performance to the default
eval loop (unless & until we can figure out stable public APIs that can
deliver equivalent performance) - see Nick's reply
form (the API itself may be stable, but the compiled code isn't, so this is
kinda covered by your last point) - see Nick's reply
_Py_HashDouble, see comment belowFirst PR: #91789