Mailing List Archive

PEP 689 – Semi-stable C API tier
Hello,
Victor and others are organizing the C-API to make it clearer what's
public and what's private (see Victor's file-based stats:
https://pythoncapi.readthedocs.io/stats.html)

It became clear that we need a tier between public and private C-API.
PEP 689 proposes such API, with an opt-in macro and transition period.

Please discuss.
And if you can think of a better name, that would be great :)



The PEP is at: https://peps.python.org/pep-0689/
Thread where this started:
https://mail.python.org/archives/list/python-dev@python.org/thread/MA4FQ7G6F35NG3TUN6RQPXRGXTYMFMDY/#MA4FQ7G6F35NG3TUN6RQPXRGXTYMFMDY
Implementation notes: https://github.com/python/cpython/issues/91744

Here's the current version for easy quoting:

----------

PEP: 689
Title: Semi-stable C API tier
Author: Petr Viktorin <encukou@gmail.com>
Status: Draft
Type: Standards Track
Content-Type: text/x-rst
Requires: 523
Created: 22-Apr-2022
Python-Version: 3.11


Abstract
========

Some functions and types of the C-API are designated *semi-stable*,
meaning that they will not change in patch (bugfix/security) releases,
but may change between minor releases (e.g. between 3.11 and 3.12) without
deprecation warnings.


Motivation & Rationale
======================

The Python C-API is currently divided into `three tiers
<https://devguide.python.org/c-api/>`__:

- Limited API, with high compatibility expectations
- Public API, which follows the :pep:`backwards compatibility policy
<387>`, and requires deprecation warnings before changes
- Private (internal) API, which can change at any time.

We need a tier between Public and Private to accommodate tools like
advanced debuggers and JIT compilers, which need access to CPython
internals but assume the C-API they use does not change in patch releases.


Setting Stability Expectations
------------------------------

Currently, there are no guarantees for the internal API -- that is, anything
that requires ``Py_BUILD_CORE`` or is named with a leading underscore.
This API can change without warning at any time, and code that uses it
is pinned to a specific build of Python.

However, in practice, even the internal API usually happens to be stable
in patch releases:

- Some CPython core developers take this as an an unwritten rule.
- Patch releases only contain bugfixes, which are unlikely to
change the API.

Semi-stable API will make the stability expectations more explicit.

It will also hopefully encourage existing users of the private API to
reach out to python-dev, so we can expose, standardize and test an API
for some of their use cases.


Reserving underscores for Private API
-------------------------------------

:pep:`523` introduced functions for use by debuggers and JIT compilers,
which are stable only across minor releases.
The functions names have leading underscores to suggest their limited
stability.

However, leading underscores usually mark *fully private* API.
CPython developers familiar with the “underscore means internal”
convention are unlikely to check if underscored functions they are
changing are documented and used outside CPython itself.

This proposal brings us a bit closer to reserving underscores
only for truly private, unstable, hands-off API.


Warning about API that is changed often
---------------------------------------

The ``PyCode_New()`` family is an example of functions that are
documented as unstable, and also often change in practice.

Moving it to the semi-stable tier will make its status obvious even
to people who don't read the docs carefully enough, and will make it
hard to use accidentally.


Changes during the Beta period
------------------------------

Since the API itself can change continuously up until Beta 1 (feature
freeze)
of a minor version, major users of this API are unlikely to test
Alpha releases and provide feedback.
It is very difficult to determine what needs to be exposed as semi-stable.

Additions to the semi-stable tier will count as *stabilization*,
and will be allowed up to Release Candidate 1.


Specification
=============

Several functions and types (“APIs”) will be moved to a new
*semi-stable* tier.

They will be expected to stay stable across patch releases,
but may change or be removed without warning in minor releases (3.x.0),
including Alpha and Beta releases of 3.x.0.

When they change significantly, code that uses them should no longer compile
(e.g. arguments should be added/removed, or a function should be renamed,
but the semantic meaning of an argument should not change).

Their definitions will be moved to a new directory, ``Include/semistable/``,
and will be included from ``Python.h``.

From Python 3.12 on, these APIs will only be usable when the
``Py_USING_SEMI_STABLE_API`` macro is defined.
CPython will only define the macro for building CPython itself
(``Py_BUILD_CORE``).

To make transition to semi-stable API easier,
in Python 3.11 the APIs will be available without
``Py_USING_SEMI_STABLE_API``
defined. In this case, using them will generate a deprecation warning on
compilers that support ``Py_DEPRECATED``.

A similar deprecation period will be used when making more APIs semi-stable
in the future:

- When moving from public API, the deprecation period should follow Python's
backwards compatibility policy (currently, it should last at least
two releases).
- When moving from public API that is documented as unstable,
the deprecation period can only last one release.
- When moving from private API or adding new API, no deprecation period
is necessary.

Leading underscores will be removed from the names of the moved APIs.
The old underscored name of a renamed API will be available (as an alias
using ``#define``) at least until that API changes.

The semi-stable C-API tier and ``Py_USING_SEMI_STABLE_API`` will be
documented,
and documentation of each semi-stable API will be updated.


Adjustments during Beta periods
-------------------------------

New APIs can be added to the semi-stable tier, and private APIs can be moved
to it, up to the first release candidate of a new minor version.
Consensus on the ``capi-sig`` or ``python-dev`` is needed in the Beta
period.

In the Beta period, no API may be moved to more private tier, e.g.
what is public in Beta 1 must stay public until the final release.


Initial semi-stable API
-----------------------

The following API will initially be semi-stable.
The set may be adjusted for 3.11.

Code object constructors:

- ``PyCode_New()``
- ``PyCode_NewWithPosOnlyArgs()``

Frame evaluation API (PEP 523):

- ``_PyFrameEvalFunction``
- ``_PyInterpreterState_GetEvalFrameFunc()``
- ``_PyInterpreterState_SetEvalFrameFunc()``
- ``_PyEval_RequestCodeExtraIndex()``
- ``_PyCode_GetExtra()``
- ``_PyCode_SetExtra()``
- ``struct _PyInterpreterFrame`` (as an incomplete, opaque struct)
- ``_PyFrame_GetFrameObject``
- ``PyEval_EvalFrameDefault``
(new function that calls ``_PyEval_EvalFrameDefault``, but takes
``PyFrameObject`` rather than ``_PyInterpreterFrame``)

(Leading underscores will be removed as mentioned above.)


Backwards Compatibility
=======================

The C API backwards compatibility story will be made clearer.


How to Teach This
=================

The changes affect advanced C programmers, who should consult the
updated reference documentation, devguide and/or What's New document·.


Reference Implementation
========================

https://github.com/python/cpython/issues/91744


Rejected Ideas
==============

It might be good to add a similar tier in the Python (not C) API,
e.g. for ``types.CodeType``.
However, the opt-in mechanism would need to be different (if any).
This is outside the scope of the PEP.


Open Issues
===========

- “Semi-stable” is not a perfect name.

- The exact set of exposed API may change.


Copyright
=========

This document is placed in the public domain or under the
CC0-1.0-Universal license, whichever is more permissive.



_______________________________________________
Python-Dev mailing list -- python-dev@python.org
To unsubscribe send an email to python-dev-leave@python.org
https://mail.python.org/mailman3/lists/python-dev.python.org/
Message archived at https://mail.python.org/archives/list/python-dev@python.org/message/PQXSP7E2B6KNXTJ2AERWMKKX42YP5D6O/
Code of Conduct: http://python.org/psf/codeofconduct/
Re: PEP 689 – Semi-stable C API tier [ In reply to ]
Ok, let me start with the serious business: API name.

I'm not comfortable with "semi-stable". Python already has a "limited
API" and a "stable ABI". Just by its name, it's unclear what
"semi-stable" means.

Honestly, I would be more comfortable with the name: "unstable API".
It would be clear that the API *can* change often. People who want to
know exactly the backward compatibility warranties can dig into the
API documentation to learn more about it.

"Unstable API" is also the name the Guido proposed for PyCode_New() last year:

* Proposal: declare "unstable APIs"
https://mail.python.org/archives/list/python-dev@python.org/thread/JM6SQ2YNMDAKXYD5O54QWMVR2X7QOXVL/
* Making code object APIs unstable
https://mail.python.org/archives/list/python-dev@python.org/thread/ZWTBR5ESYR26BUIVMXOKPFRLGGYDJSFC/

Victor
_______________________________________________
Python-Dev mailing list -- python-dev@python.org
To unsubscribe send an email to python-dev-leave@python.org
https://mail.python.org/mailman3/lists/python-dev.python.org/
Message archived at https://mail.python.org/archives/list/python-dev@python.org/message/UIUCHEVHLUJJFDZASBDTUDHLW4PIZWLP/
Code of Conduct: http://python.org/psf/codeofconduct/
Re: PEP 689 – Semi-stable C API tier [ In reply to ]
> Rejected Ideas
> ==============
>
> It might be good to add a similar tier in the Python (not C) API,
> e.g. for ``types.CodeType``.
> However, the opt-in mechanism would need to be different (if any).
> This is outside the scope of the PEP.

For types.CodeType constructor, would it be possible to just a mention
in the *documentation* that this API is "unstable"? It would come with
a link to definition of the "unstable" C API: explain that it can
change in 3.x.y bugfix releases, not not in 3.x.0 releases (major?
minor? I never recall how they should be called).

For now, I don't think that there is a need to actively remove this
API from the "default" Python API and add an opt-in option to get
access to these functions. But having a mention just in the
documentation would be better than nothing.

It seems to be popular complain and request. For example, most of the
ast module would fall into this "unstable API". Previous discussions:

* Proposal: declare "unstable APIs"
https://mail.python.org/archives/list/python-dev@python.org/thread/JM6SQ2YNMDAKXYD5O54QWMVR2X7QOXVL/
* Making code object APIs unstable
https://mail.python.org/archives/list/python-dev@python.org/thread/ZWTBR5ESYR26BUIVMXOKPFRLGGYDJSFC/

On one side, it's important to communicate that the API *can* change
in 3.x.0 releases, but also provide some warranties that the API *must
not change* in 3.x.y bugfix releases.

Victor
_______________________________________________
Python-Dev mailing list -- python-dev@python.org
To unsubscribe send an email to python-dev-leave@python.org
https://mail.python.org/mailman3/lists/python-dev.python.org/
Message archived at https://mail.python.org/archives/list/python-dev@python.org/message/AS7KUFPSGNRNBUKMXPHHKHXAVDAZH2AT/
Code of Conduct: http://python.org/psf/codeofconduct/
Re: PEP 689 – Semi-stable C API tier [ In reply to ]
On 29. 04. 22 16:32, Victor Stinner wrote:
> Ok, let me start with the serious business: API name.
>
> I'm not comfortable with "semi-stable". Python already has a "limited
> API" and a "stable ABI". Just by its name, it's unclear what
> "semi-stable" means.
>
> Honestly, I would be more comfortable with the name: "unstable API".
> It would be clear that the API *can* change often. People who want to
> know exactly the backward compatibility warranties can dig into the
> API documentation to learn more about it.
>
> "Unstable API" is also the name the Guido proposed for PyCode_New() last year:
>
> * Proposal: declare "unstable APIs"
> https://mail.python.org/archives/list/python-dev@python.org/thread/JM6SQ2YNMDAKXYD5O54QWMVR2X7QOXVL/
> * Making code object APIs unstable
> https://mail.python.org/archives/list/python-dev@python.org/thread/ZWTBR5ESYR26BUIVMXOKPFRLGGYDJSFC/
>
> Victor


Nick Coghlan argued against that term:

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


https://mail.python.org/archives/list/python-dev@python.org/message/CTKKTHUV5R2A2RRN5DM32UQFNC42DDGJ/


But I also like “unstable” better than “semi-stable”. Splitting the
internals into “private”/“internal” and “unstable” seems reasonable.
_______________________________________________
Python-Dev mailing list -- python-dev@python.org
To unsubscribe send an email to python-dev-leave@python.org
https://mail.python.org/mailman3/lists/python-dev.python.org/
Message archived at https://mail.python.org/archives/list/python-dev@python.org/message/MPOPMXJ7AZHE5MGSKCMJO4ZDJERMQNHE/
Code of Conduct: http://python.org/psf/codeofconduct/
Re: PEP 689 – Semi-stable C API tier [ In reply to ]
On Fri, Apr 29, 2022 at 10:15 AM Petr Viktorin <encukou@gmail.com> wrote:

> On 29. 04. 22 16:32, Victor Stinner wrote:
> > Ok, let me start with the serious business: API name.
> >
> > I'm not comfortable with "semi-stable". Python already has a "limited
> > API" and a "stable ABI". Just by its name, it's unclear what
> > "semi-stable" means.
> >
> > Honestly, I would be more comfortable with the name: "unstable API".
> > It would be clear that the API *can* change often. People who want to
> > know exactly the backward compatibility warranties can dig into the
> > API documentation to learn more about it.
> >
> > "Unstable API" is also the name the Guido proposed for PyCode_New() last
> year:
> >
> > * Proposal: declare "unstable APIs"
> >
> https://mail.python.org/archives/list/python-dev@python.org/thread/JM6SQ2YNMDAKXYD5O54QWMVR2X7QOXVL/
> > * Making code object APIs unstable
> >
> https://mail.python.org/archives/list/python-dev@python.org/thread/ZWTBR5ESYR26BUIVMXOKPFRLGGYDJSFC/
> >
> > Victor
>
>
> Nick Coghlan argued against that term:
>
> > "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.
>
> —
>
> https://mail.python.org/archives/list/python-dev@python.org/message/CTKKTHUV5R2A2RRN5DM32UQFNC42DDGJ/
>
>
> But I also like “unstable” better than “semi-stable”. Splitting the
> internals into “private”/“internal” and “unstable” seems reasonable.
>

I think picking "semi-stable" would be giving in to the OCD nerd in all of
us. :-) While perhaps technically less precise, "unstable" is the catchy
name with the right association. (And yes, we should keep it stable within
bugfix releases, but the name doesn't need to reflect that detail.) The
"internal API" isn't an API at all (except for CPython core developers and
contributors). The "unstable API" would definitely be an *API* for users
outside the core.

So let's please go with "unstable".

--
--Guido van Rossum (python.org/~guido)
*Pronouns: he/him **(why is my pronoun here?)*
<http://feministing.com/2015/02/03/how-using-they-as-a-singular-pronoun-can-change-the-world/>
Re: PEP 689 – Semi-stable C API tier [ In reply to ]
I think that the main advantage of "unstable" over "semi-stable" is
that it's a single word :-D It avoids the really hard question (!)
about the separator between "semi" and "stable" ;-) (semistable?
semi-stable? semi_stable?).

Victor
_______________________________________________
Python-Dev mailing list -- python-dev@python.org
To unsubscribe send an email to python-dev-leave@python.org
https://mail.python.org/mailman3/lists/python-dev.python.org/
Message archived at https://mail.python.org/archives/list/python-dev@python.org/message/V76VFFMUZFNGSQBOEYDKJH22D6NFZJZ2/
Code of Conduct: http://python.org/psf/codeofconduct/
Re: PEP 689 – Semi-stable C API tier [ In reply to ]
On 2022-04-29 18:02, Guido van Rossum wrote:
> On Fri, Apr 29, 2022 at 10:15 AM Petr Viktorin <encukou@gmail.com
> <mailto:encukou@gmail.com>> wrote:
>
> On 29. 04. 22 16:32, Victor Stinner wrote:
> > Ok, let me start with the serious business: API name.
> >
> > I'm not comfortable with "semi-stable". Python already has a "limited
> > API" and a "stable ABI". Just by its name, it's unclear what
> > "semi-stable" means.
> >
> > Honestly, I would be more comfortable with the name: "unstable API".
> > It would be clear that the API *can* change often. People who want to
> > know exactly the backward compatibility warranties can dig into the
> > API documentation to learn more about it.
> >
> > "Unstable API" is also the name the Guido proposed for
> PyCode_New() last year:
> >
> > * Proposal: declare "unstable APIs"
> >
> https://mail.python.org/archives/list/python-dev@python.org/thread/JM6SQ2YNMDAKXYD5O54QWMVR2X7QOXVL/
> <https://mail.python.org/archives/list/python-dev@python.org/thread/JM6SQ2YNMDAKXYD5O54QWMVR2X7QOXVL/>
> > * Making code object APIs unstable
> >
> https://mail.python.org/archives/list/python-dev@python.org/thread/ZWTBR5ESYR26BUIVMXOKPFRLGGYDJSFC/
> <https://mail.python.org/archives/list/python-dev@python.org/thread/ZWTBR5ESYR26BUIVMXOKPFRLGGYDJSFC/>
> >
> > Victor
>
>
> Nick Coghlan argued against that term:
>
> > "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.
>
> —
> https://mail.python.org/archives/list/python-dev@python.org/message/CTKKTHUV5R2A2RRN5DM32UQFNC42DDGJ/
> <https://mail.python.org/archives/list/python-dev@python.org/message/CTKKTHUV5R2A2RRN5DM32UQFNC42DDGJ/>
>
>
> But I also like “unstable” better than “semi-stable”. Splitting the
> internals into “private”/“internal” and “unstable” seems reasonable.
>
>
> I think picking "semi-stable" would be giving in to the OCD nerd in all
> of us. :-) While perhaps technically less precise, "unstable" is the
> catchy name with the right association. (And yes, we should keep it
> stable within bugfix releases, but the name doesn't need to reflect that
> detail.) The "internal API" isn't an API at all (except for CPython core
> developers and contributors). The "unstable API" would definitely be an
> *API* for users outside the core.
>
> So let's please go with "unstable".
>
I was going to suggest "metastable". Too late? :-)
_______________________________________________
Python-Dev mailing list -- python-dev@python.org
To unsubscribe send an email to python-dev-leave@python.org
https://mail.python.org/mailman3/lists/python-dev.python.org/
Message archived at https://mail.python.org/archives/list/python-dev@python.org/message/5B7ES3BZJTKORNCT6LWLRHM7UNSFCKYU/
Code of Conduct: http://python.org/psf/codeofconduct/
Re: PEP 689 – Semi-stable C API tier [ In reply to ]
MRAB writes:
> On 2022-04-29 18:02, Guido van Rossum wrote:
> > On Fri, Apr 29, 2022 at 10:15 AM Petr Viktorin <encukou@gmail.com
> > <mailto:encukou@gmail.com>> wrote:
> >
> > On 29. 04. 22 16:32, Victor Stinner wrote:
> > > Ok, let me start with the serious business: API name.
> > >
> > > I'm not comfortable with "semi-stable". Python already has a "limited
> > > API" and a "stable ABI". Just by its name, it's unclear what
> > > "semi-stable" means.
> > >
> > > Honestly, I would be more comfortable with the name: "unstable API".
> > > It would be clear that the API *can* change often. People who want to
> > > know exactly the backward compatibility warranties can dig into the
> > > API documentation to learn more about it.
> > >
> > > "Unstable API" is also the name the Guido proposed for
> > PyCode_New() last year:
> > >
> > > * Proposal: declare "unstable APIs"
> > >
> > https://mail.python.org/archives/list/python-dev@python.org/thread/JM6SQ2YNMDAKXYD5O54QWMVR2X7QOXVL/
> > <https://mail.python.org/archives/list/python-dev@python.org/thread/JM6SQ2YNMDAKXYD5O54QWMVR2X7QOXVL/>
> > > * Making code object APIs unstable
> > >
> > https://mail.python.org/archives/list/python-dev@python.org/thread/ZWTBR5ESYR26BUIVMXOKPFRLGGYDJSFC/
> > <https://mail.python.org/archives/list/python-dev@python.org/thread/ZWTBR5ESYR26BUIVMXOKPFRLGGYDJSFC/>
> > >
> > > Victor
> >
> >
> > Nick Coghlan argued against that term:
> >
> > > "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.
> >
> > —
> > https://mail.python.org/archives/list/python-dev@python.org/message/CTKKTHUV5R2A2RRN5DM32UQFNC42DDGJ/
> > <https://mail.python.org/archives/list/python-dev@python.org/message/CTKKTHUV5R2A2RRN5DM32UQFNC42DDGJ/>
> >
> >
> > But I also like “unstable” better than “semi-stable”. Splitting the
> > internals into “private”/“internal” and “unstable” seems reasonable.
> >
> >
> > I think picking "semi-stable" would be giving in to the OCD nerd in all
> > of us. :-) While perhaps technically less precise, "unstable" is the
> > catchy name with the right association. (And yes, we should keep it
> > stable within bugfix releases, but the name doesn't need to reflect that
> > detail.) The "internal API" isn't an API at all (except for CPython core
> > developers and contributors). The "unstable API" would definitely be an
> > *API* for users outside the core.
> >
> > So let's please go with "unstable".
> >
> I was going to suggest "metastable". Too late? :-)
A
Bikeshedding to a new level! --+
_______________________________________________
Python-Dev mailing list -- python-dev@python.org
To unsubscribe send an email to python-dev-leave@python.org
https://mail.python.org/mailman3/lists/python-dev.python.org/
Message archived at https://mail.python.org/archives/list/python-dev@python.org/message/CGNNVU7CUB4U6TK33FSYVIGP7OPPG4XJ/
Code of Conduct: http://python.org/psf/codeofconduct/
Re: PEP 689 – Semi-stable C API tier [ In reply to ]
On 4/29/2022 11:42 AM, Stephen J. Turnbull wrote:
> MRAB writes:
> > On 2022-04-29 18:02, Guido van Rossum wrote:
> > > On Fri, Apr 29, 2022 at 10:15 AM Petr Viktorin <encukou@gmail.com
> > > <mailto:encukou@gmail.com>> wrote:
> > >
> > > On 29. 04. 22 16:32, Victor Stinner wrote:
> > > > Ok, let me start with the serious business: API name.
> > > >
> > > > I'm not comfortable with "semi-stable". Python already has a "limited
> > > > API" and a "stable ABI". Just by its name, it's unclear what
> > > > "semi-stable" means.
> > > >
> > > > Honestly, I would be more comfortable with the name: "unstable API".
> > > > It would be clear that the API *can* change often. People who want to
> > > > know exactly the backward compatibility warranties can dig into the
> > > > API documentation to learn more about it.
> > > >
> > > > "Unstable API" is also the name the Guido proposed for
> > > PyCode_New() last year:
> > > >
> > > > * Proposal: declare "unstable APIs"
> > > >
> > > https://mail.python.org/archives/list/python-dev@python.org/thread/JM6SQ2YNMDAKXYD5O54QWMVR2X7QOXVL/
> > > <https://mail.python.org/archives/list/python-dev@python.org/thread/JM6SQ2YNMDAKXYD5O54QWMVR2X7QOXVL/>
> > > > * Making code object APIs unstable
> > > >
> > > https://mail.python.org/archives/list/python-dev@python.org/thread/ZWTBR5ESYR26BUIVMXOKPFRLGGYDJSFC/
> > > <https://mail.python.org/archives/list/python-dev@python.org/thread/ZWTBR5ESYR26BUIVMXOKPFRLGGYDJSFC/>
> > > >
> > > > Victor
> > >
> > >
> > > Nick Coghlan argued against that term:
> > >
> > > > "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.
> > >
> > > —
> > > https://mail.python.org/archives/list/python-dev@python.org/message/CTKKTHUV5R2A2RRN5DM32UQFNC42DDGJ/
> > > <https://mail.python.org/archives/list/python-dev@python.org/message/CTKKTHUV5R2A2RRN5DM32UQFNC42DDGJ/>
> > >
> > >
> > > But I also like “unstable” better than “semi-stable”. Splitting the
> > > internals into “private”/“internal” and “unstable” seems reasonable.
> > >
> > >
> > > I think picking "semi-stable" would be giving in to the OCD nerd in all
> > > of us. :-) While perhaps technically less precise, "unstable" is the
> > > catchy name with the right association. (And yes, we should keep it
> > > stable within bugfix releases, but the name doesn't need to reflect that
> > > detail.) The "internal API" isn't an API at all (except for CPython core
> > > developers and contributors). The "unstable API" would definitely be an
> > > *API* for users outside the core.
> > >
> > > So let's please go with "unstable".
> > >
> > I was going to suggest "metastable". Too late? :-)
> A
> Bikeshedding to a new level! --+

Metabikeshedding...

> _______________________________________________
> Python-Dev mailing list -- python-dev@python.org
> To unsubscribe send an email to python-dev-leave@python.org
> https://mail.python.org/mailman3/lists/python-dev.python.org/
> Message archived at https://mail.python.org/archives/list/python-dev@python.org/message/CGNNVU7CUB4U6TK33FSYVIGP7OPPG4XJ/
> Code of Conduct: http://python.org/psf/codeofconduct/

_______________________________________________
Python-Dev mailing list -- python-dev@python.org
To unsubscribe send an email to python-dev-leave@python.org
https://mail.python.org/mailman3/lists/python-dev.python.org/
Message archived at https://mail.python.org/archives/list/python-dev@python.org/message/GCS2AC32ODMY44PA6AS6JLLCJBP55BZV/
Code of Conduct: http://python.org/psf/codeofconduct/
Re: PEP 689 – Semi-stable C API tier [ In reply to ]
On 30/04/22 5:25 am, MRAB wrote:
> I was going to suggest "metastable". Too late? :-)

What, the API is balanced on a knife edge and likely to collapse
into something else if you sneeze too hard?

--
Greg
_______________________________________________
Python-Dev mailing list -- python-dev@python.org
To unsubscribe send an email to python-dev-leave@python.org
https://mail.python.org/mailman3/lists/python-dev.python.org/
Message archived at https://mail.python.org/archives/list/python-dev@python.org/message/CUWORBXDLOK74M7H6HZSXSMC5ZKMCFFY/
Code of Conduct: http://python.org/psf/codeofconduct/
Re: PEP 689 – Semi-stable C API tier [ In reply to ]
On 2022-04-30 03:17, Greg Ewing wrote:
> On 30/04/22 5:25 am, MRAB wrote:
>> I was going to suggest "metastable". Too late? :-)
>
> What, the API is balanced on a knife edge and likely to collapse
> into something else if you sneeze too hard?
>
There's a possibility that the universe might be metastable, so a
metastable API might not be that big a deal.
_______________________________________________
Python-Dev mailing list -- python-dev@python.org
To unsubscribe send an email to python-dev-leave@python.org
https://mail.python.org/mailman3/lists/python-dev.python.org/
Message archived at https://mail.python.org/archives/list/python-dev@python.org/message/57JT4SKQQGAN42Y2TFXCUCVAUYOQK3LV/
Code of Conduct: http://python.org/psf/codeofconduct/
Re: PEP 689 – Semi-stable C API tier [ In reply to ]
On Sat, 30 Apr 2022, 3:02 am Guido van Rossum, <guido@python.org> wrote:

>
> I think picking "semi-stable" would be giving in to the OCD nerd in all of
> us. :-) While perhaps technically less precise, "unstable" is the catchy
> name with the right association. (And yes, we should keep it stable within
> bugfix releases, but the name doesn't need to reflect that detail.) The
> "internal API" isn't an API at all (except for CPython core developers and
> contributors). The "unstable API" would definitely be an *API* for users
> outside the core.
>
> So let's please go with "unstable".
>

While I've advocated for semi-stable in previous threads, I now agree the
pragmatic arguments for "unstable" hold up well enough to make the simpler
term the better choice:

* no question around using a hyphen or not
* "unstable public C API" is sufficient to distinguish the new tier from
Py_BUILD_CORE's completely unstable internal API

The risks of misinterpretation are also low:

* external users that need one of these APIs will presumably be invested
enough to actually check the stability expectations in the docs
* core devs will have regression tests to remind us that the published
unstable APIs aren't allowed to change after beta 1

Cheers,
Nick.




> --
> --Guido van Rossum (python.org/~guido)
> *Pronouns: he/him **(why is my pronoun here?)*
> <http://feministing.com/2015/02/03/how-using-they-as-a-singular-pronoun-can-change-the-world/>
>