On 05. 01. 22 17:45, Matti Picus wrote:
On 5/1/22 6:32 pm, Petr Viktorin wrote:
So, I'd like to drop the leading underscore, and add PyType_GetModuleByDef directly to the limited API.
This seems like a very helpful function, and if I recall correctly pretty much required for using the limited API with multi-stage module loading.
Sorry for the newbie question, that probably has been answered many times before but I don't know how to google for the answer.
What does this mean for ABI3 wheels?
An in too much detail: If this is part of 3.11, and I build a wheel using the newer limited API interface, will I still be able to call it ABI3?
If so does that mean that somehow I need to tell people "yes this is ABI3 but only for Python3.11+?
Yes. Compile with PY_LIMITED_API defined as 0x030B0000 (hex version for 3.11), which makes the extension compatible with 3.11+.
Is there tooling to help me do that?
Well, that's certainly an area that could be improved :) You can add Requires-Python to your package (wheel/sdist) to prevent installation on older Pythons, but if the extension file itself ends up installed on 3.10 or below, it'll likely fail in an unfriendly way (missing symbols).