Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

API for selecting an API subset/tier #59

Open
encukou opened this issue Jul 11, 2023 · 1 comment
Open

API for selecting an API subset/tier #59

encukou opened this issue Jul 11, 2023 · 1 comment

Comments

@encukou
Copy link
Contributor

encukou commented Jul 11, 2023

We currently have:

  • Py_LIMITED_API=X (perhaps confusingly named), to select API that's not newer than X, and that's (very roughly) considered “good” by Python 3.2 standards
  • Py_BUILD_CORE for internals (technically this should start with an underscore)

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).

@encukou encukou changed the title API for selecting the API API for selecting an API subset/tier Jul 11, 2023
@iritkatriel iritkatriel added the v label Jul 20, 2023
@iritkatriel iritkatriel removed the v label Oct 23, 2023
@vstinner
Copy link
Contributor

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants