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

Semi-stable C API tier #123

Closed
encukou opened this issue Apr 25, 2022 · 4 comments
Closed

Semi-stable C API tier #123

encukou opened this issue Apr 25, 2022 · 4 comments

Comments

@encukou
Copy link
Member

encukou commented Apr 25, 2022

Hi,
I'd like to introduce a subset of the C API that can change in every minor release, without deprecation warnings, for use cases like debuggers and JIT compilers (e.g. PEP-523). We already have API like this, but it's marked as such in inconsistent ways (leading underscores, notes in docs or in a PEP).
To prevent using it accidentally, it would be opt-in (exposed only by defining Py_USING_SEMI_STABLE_API). API that's now public or documented would have a deprecation period of at least one release rather than the usual two until this opt-in is mandatory.
Details are discussed in python/cpython#91744, background is on python-dev

The bad news is that this API is still changing (e.g. the PyCode_New signature changed last week). It will probably be necessary to adjust the semi-stable API in early betas. (I see it as part of stabilization, but views might vary.) It should be as stable as the ABI -- formally in the first RC, but hopefully sooner.

Is the SC OK with this? If yes, how much oversight over details does it want? Does this need a PEP?

(I added this to the agenda)

@gvanrossum
Copy link
Member

I'm confused. You state "can change in every minor release" but also "as stable as the ABI". Those seem wildly different. Which is it? What am I misunderstanding?

@encukou
Copy link
Member Author

encukou commented Apr 25, 2022

I'm talking about the regular, version-specific ABI, like cp310-cp310-manylinux_2_17_x86_64 in wheels. Not the Stable ABI (abi3).

@gvanrossum
Copy link
Member

Thanks; your use of "stable" and "ABI" in the same phrase confused me. ;-)

@encukou
Copy link
Member Author

encukou commented Apr 25, 2022

It needs a PEP. I'll write one.

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

No branches or pull requests

2 participants