Python Limited C-API - Target older Pythons #642
Closed
ferdonline
started this conversation in
Ideas
Replies: 1 comment
-
Dear @ferdonline, I'm glad nanobind is useful to you. Unfortunately there is absolutely no way to target the stable ABI/limited API for Python < 3.12. Nanobind critically depends functions that were only added to this version (look for my name here https://docs.python.org/3/whatsnew/3.12.html#id4). They cannot be emulated, otherwise I would have done so. Pythoncapi-compat can sometimes emulate missing functionality, but it cannot turn fundamentally unstable constructs into stable ones. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi! First of all, Kudos for the project - At EPFL/BBP & Yale we have been happy to use it for improving bindings of the NEURON simulator.
In the meantime we would like to start using the limited API so that we can ship the project with fewer binary wheels.
Unfortunately IIUC, Nanobind would require Python 3.12, meaning that before that we would still need to use the regular API and create a specific wheel for each minor Python version. Since we want support back to 3.7 that is a major blocker.
While reading on the topic, I was pleased to know there is a compatibility layer - pythoncapi-compat (mentioned in this nanobind issue comment). I was wondering, could that potentially help lowering the bar so we could target the limited API of 3.6? Is it something that would make sense? I can imagine that we may potentially have some performance degradation, but users of the limited C-API are already willing to trade some of it.
Thanks
Beta Was this translation helpful? Give feedback.
All reactions