On 16.06.2022 17:16, Victor Stinner wrote:
On Mon, Jun 13, 2022 at 5:36 PM Marc-Andre Lemburg <mal@egenix.com> wrote:
In the past we always said: "_Py* is an internal API. Use at your own risk.", which I guess is somewhere between the warning and the strict "don't use" policy you are describing.
In the last year, I tried to go further: make sure that it's no longer technically possible to use internal functions (the ones that I modified).
I made two changes:
Move API from the public API to the internal API: if you really want to access to internal API, you know have to (1) define Py_BUILD_CORE (2) use a different header file (with "internal/" in its path).
Replace PyAPI_FUNC() with "extern", so it's technically no longer possible to use modified functions outside Python itself. This change cannot be done if an internal API is used by a stdlib module built as a shared library.
That's too draconian for my taste.
With a proper reporting process in place, we'll get communication going between extension writers and core devs and without alienating the extension writers, or making assumptions which don't hold in practice.
I have a feeling that such communication is not really working out. I keep monitoring changes to the APIs and raise concerns where needed in areas where I know they are going to cause problems, but that's only one set of eyes. We need plenty more.
This will benefit both core devs and extension writers, since only a healthy and reasonably complete Python C API will help sustain the popularity and attractiveness of Python in areas which are far away from core development - e.g. most of the PyData or scientific space.
-- Marc-Andre Lemburg eGenix.com
Professional Python Services directly from the Experts (#1, Jun 17 2022)
Python Projects, Coaching and Support ... https://www.egenix.com/ Python Product Development ... https://consulting.egenix.com/
::: We implement business ideas - efficiently in both time and costs :::
eGenix.com Software, Skills and Services GmbH Pastor-Loeh-Str.48 D-40764 Langenfeld, Germany. CEO Dipl.-Math. Marc-Andre Lemburg Registered at Amtsgericht Duesseldorf: HRB 46611 https://www.egenix.com/company/contact/ https://www.malemburg.com/