capi-workgroup / problems

Discussions about problems with the current C Api
19 stars 6 forks source link

API for selecting an API subset/tier #59

Open encukou opened 1 year ago

encukou commented 1 year ago

We currently have:

An early revision of PEP-689 proposed Py_USING_UNSTABLE_API to opt-in to “unstable” API, but later it was decided that the naming is prominent enough.

More opt-in/out macros are possible. Some are suggested in #54.

There was some discussion about selecting tiers by header files instead, so instead of <Python.h> you'd #include <Python-stable.h> or <Python-unstable.h> or <Python-legacy.h> or something. (A downside is that it would make versioning the subsets hard.)

If we do an overhaul, we might want to consolidate/reorganize/rename these (with backcompat aliases where possible, of course).

vstinner commented 4 months ago

I wrote PEP 743: Add Py_COMPAT_API_VERSION to the Python C API which is related to these ("API subset") ideas.