osdir.com

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Python-Dev] Procedure for adding new public C API


On 22 May 2018 at 18:00, Steve Dower <steve.dower at python.org> wrote:
> On 21May2018 0708, Paul Moore wrote:
>>
>> On 21 May 2018 at 14:42, Serhiy Storchaka <storchaka at gmail.com> wrote:
>>>>
>>>> Is it even acceptable to add a symbol into the limited ABI? I thought
>>>> the idea was that if I linked with python3.dll, my code would work
>>>> with any version of Python 3? By introducing new symbols, code linked
>>>> with the python3.dll shipped with (say) Python 3.8 would fail to run
>>>> if executed with the python3.dll from Python 3.5.
>>>
>>>
>>> The limited API is versioned. If you use only Python 3.5 API (define
>>> Py_LIMITED_API to 0x03050000), the built code will be expected to work on
>>> 3.5 and later. In theory.
>>
>>
>> Thanks, I'd missed that point (I need to go and check my build
>> process, in that case :-)).
>
>
> The fact that the headers and python3.def claim different functions are in
> the limited API basically breaks any ability to use this. You really do need
> to build with the oldest possible version.
>
> Alternatively, we can try again to get everyone to agree that since their
> APIs shipped as stable in earlier versions that we need to actually make
> them stable (or take a breaking backwards incompatible change to make them
> non-stable). Last time Zach and I attempted this we got nowhere. (There's a
> bug on bpo somewhere with details and helper scripts, as well as unrecorded
> discussions from the sprints a couple years ago.)
>
> Sorry to be the bearer of bad news.

I think I recall the earlier discussion.

I agree that the current situation makes the stable ABI less useful
than it would otherwise have been. But being able to build an
embedding application or extension, and say "this will work with any
version of Python newer than the version I built it with" is still
very useful.

Paul