No, I was not asking for that.
I was asking for the motivation to support building wheels with a newer CPython version that are meant to work (also) with an older version, since that’s not how the ABI has worked so far. I had assumed we were okay with a one-time “barrier” – the idea that if you want your wheel to support ABI4 (which is needed to support no-GIL builds) you have to rebuild for 3.13 (and with an appropriate #define), and you’d be good for N future releases (where N >= 5 or so, TBD).
But it seems that the motivation for your proposal is simply that you think it can be done (and supposedly it would be friendlier for package maintainers). And that’s fine.
I’m not sure I fully understand this scenario. Is it like vim, which can dynamically load one of several different CPython versions and then offers it an API for manipulating vim internals? But in most cases, wouldn’t such an app just pick a CPython version to target?
Or are you thinking of frameworks like Tensorflow or PyTorch, which are presented as Python packages, but really contain a very large core of C++ code with Python linked in as the UI?
Thanks for the clarifications on PyObject_HEAD, I have no further questions there!
Regarding “too late for 3.12+”, I realize I was confused by the shorthand “3.12+” – I interpreted it as the state of the main branch after 3.12 was released (a notation we used in sys.version in the past IIRC), but I understand you meant “things that should be compatible with 3.12 and later”. Which is very different. And now I understand the “too late” part. ![]()