
On Wed, 19 May 2021, 2:23 am Marc-Andre Lemburg, <mal@egenix.com> wrote:
On 18.05.2021 17:27, Petr Viktorin wrote:
I'm definitely not proposing to remove Py_FrozenMain from the default, minor-version-specific ABI.
I don't quite follow that logic. Not many people are using the stable ABI, that's clear, but that should be seen as a chance, not as proof that APIs are not used and thus not necessary.
If you're saying: "frozen applications should not use the stable ABI" that's fine, but it should be documented as such.
If you need something that's not part of the stable ABI yet, then you can't use it. That goes for any part of the stable ABI.
Exactly, which is why it should include a good set of the APIs to make it useful.
Applications that embed or statically link Python (including frozen applications) gain nothing from using the stable ABI. Only extension modules benefit, since they can be built once and imported from multiple versions.
Py_FrozenMain isn't useful to modules (calling it won't do anything sensible, so about all they can do with it is take its address), so it doesn't really make sense to have it in the stable ABI.
My assumption had been that it was already in the stable ABI by mistake in 3.9 and earlier, so modules might already have been referencing it (however pointless that would be), so we needed to figure out a way to include it that let the new stable ABI checking test case pass on a statically linked Python build.
Petr now indicates that isn't the case - instead, it was added by mistake in Python 3.10. Given that, the simplest answer is to revert that change and continue leaving it out of the stable ABI.
If someone has an actual use case for it being in the stable ABI, then it could be reconsidered for addition, but so far no such use case has been presented.
Cheers, Nick.